22
33A modern, feature-rich OpenAPI documentation viewer and API testing tool. Built with React, TypeScript, Shadcn/ui, and Tailwind CSS.
44
5- ** Live Demo** : [ openapi.yxqi.cn] ( https://openapi.yxqi.cn )
5+ ** Live Demo** : [ openapi.yxqi.cn] ( https://openapi.yxqi.cn ) | [ README 中文版 ] ( README.zh-CN.md )
66
77## Features
88
9+ ### API Documentation & Testing
10+
911- ** Schema-driven forms** — Auto-renders inputs based on OpenAPI schema types (text, number, boolean, enum, date picker, file upload, UUID generator)
1012- ** Live API testing** — Send requests directly from the browser with parameter validation, auth headers, and response display
1113- ** JSON editor** — CodeMirror 6 with syntax highlighting, bidirectional sync with schema form
1214- ** Structured schema display** — Three-column table view (Field / Type / Description) with nested object support
13- - ** Data model browser** — Browse all schema definitions with cross-references to endpoints
14- - ** Model ↔ Endpoint linking** — See which models an endpoint uses, and which endpoints reference a model
1515- ** Curl generation** — Auto-generated curl command with one-click copy
1616- ** Token extraction** — Detect token fields in login responses and apply as Bearer auth with one click
17+ - ** Request history** — Per-endpoint request history stored in IndexedDB
18+
19+ ### Data Models
20+
21+ - ** Model browser** — Browse all schema definitions with field details and constraints
22+ - ** Model graph** — Interactive relationship graph with focus/depth controls and SVG/PNG/Mermaid export
23+ - ** Model ↔ Endpoint linking** — See which models an endpoint uses, and which endpoints reference a model
24+
25+ ### Schema Viewer
26+
27+ - ** OpenAPI & external schemas** — View schemas from loaded spec or upload standalone JSON/YAML files
28+ - ** Field detail inspector** — Constraints, default values, enum options, file upload rules, cross-field rules
29+ - ** Category & type filtering** — Filter schemas by category tags and types
30+
31+ ### Environment Management
32+
33+ - ** Environment profiles** — Create multiple environments (local/dev/test/staging/prod) with independent base URLs and auth configs
34+ - ** Auto-seed from spec** — Environments auto-populate from OpenAPI ` servers[] ` field
35+ - ** Per-environment auth** — Each environment stores its own auth type, token, and credentials
36+ - ** Quick switching** — Sidebar dropdown switcher (shadcn workspace-switcher pattern) for instant environment switching
37+ - ** Cross-environment API status** — Background-fetch specs from all environments to detect endpoint presence; auto-infers lifecycle status (Online / Testing / In Dev / Local Only / Teammate's Work)
38+ - ** Status filtering** — Filter endpoints by their cross-environment status
39+
40+ ### Diagnostics & Diff
41+
42+ - ** API diagnostics** — Detect issues like unresolved $refs, duplicate operationIds, empty schemas, missing descriptions
43+ - ** Spec diff** — Compare two OpenAPI specs side-by-side with breaking change detection
44+
45+ ### Favorites
46+
47+ - ** Star endpoints** — Bookmark frequently used endpoints with a star icon
48+ - ** Favorites view** — Dedicated sidebar page to browse all starred endpoints
49+
50+ ### General
51+
1752- ** Multiple auth methods** — Bearer, Basic, API Key, OAuth2 Password flow
1853- ** Swagger 2.0 / OpenAPI 3.0 / 3.1 compatible** — Auto-converts Swagger 2.0 specs
19- - ** Dark theme** — OKLCH color system with custom scrollbar styling
20- - ** i18n** — Chinese and English, switchable in sidebar, persisted to localStorage
21- - ** Animations** — Smooth transitions powered by Motion and animate-ui
54+ - ** Dark theme** — OKLCH color system with system/light/dark mode
55+ - ** i18n** — English, Simplified Chinese, Traditional Chinese, Hong Kong Chinese, Japanese, Korean
56+ - ** Share links** — Generate shareable URLs with spec, base URL, and current location
57+ - ** Environment variables** — Define ` {{variables}} ` for use in parameters and request bodies
58+ - ** Command palette** — ` Cmd+K ` / ` Ctrl+K ` to search endpoints, models, and schemas
2259- ** Progressive rendering** — Handles 500+ endpoints without blocking the UI
2360- ** Single-file output** — Builds to a single ` dist/index.html ` for easy deployment
2461- ** FastAPI integration** — Python package for drop-in Swagger UI replacement
@@ -41,12 +78,12 @@ Open [http://localhost:5173](http://localhost:5173), paste an OpenAPI spec URL,
4178| ` auth_type ` | Set auth type (` bearer ` , ` basic ` , ` apikey ` ) | ` &auth_type=bearer ` |
4279| ` auth_token ` | Set auth token | ` &auth_token=xxx ` |
4380| ` title ` | Override page title | ` &title=My%20API ` |
44- | ` lang ` | Set language (` zh ` , ` en ` ) | ` &lang=en ` |
4581
4682## Build
4783
4884``` bash
49- pnpm build # Production build → dist/index.html (single file)
85+ pnpm build # Production build -> dist/index.html (single file)
86+ pnpm test # Run tests
5087pnpm lint # ESLint
5188pnpm typecheck # TypeScript type check
5289```
@@ -66,11 +103,13 @@ setup_docs(app)
66103## Tech Stack
67104
68105- ** React 19** + ** TypeScript 6** + ** Vite 8**
69- - ** Shadcn/ui** (new-york style) — 15 + components
106+ - ** Shadcn/ui** (Radix Nova style) — 20 + components
70107- ** Tailwind CSS v4** with OKLCH color system
71108- ** CodeMirror 6** — JSON editor
109+ - ** TanStack Virtual** — Virtualized lists for large specs
72110- ** Motion** (Framer Motion) + ** animate-ui** — Animations
73- - ** react-i18next** — Internationalization
111+ - ** idb** — IndexedDB wrapper for persistent storage
112+ - ** react-i18next** — Internationalization (6 languages)
74113- ** Sonner** — Toast notifications
75114- ** marked** — Markdown rendering
76115- ** vite-plugin-singlefile** — Single HTML output
@@ -80,18 +119,23 @@ setup_docs(app)
80119```
81120src/
82121├── components/
83- │ ├── ui/ # Shadcn components
122+ │ ├── ui/ # Shadcn components (20+)
84123│ ├── animate-ui/ # Animated components (motion-powered)
85- │ ├── layout/ # AppSidebar, Header, ViewToolbar, SelectionFab
86- │ ├── endpoints/ # RouteCard, TryTab, DocTab, ResponsePanel, TagFilter
87- │ ├── models/ # ModelsView, ModelCard
88- │ ├── schema/ # SchemaTree, SchemaForm
89- │ └── editor/ # JsonEditor (CodeMirror)
90- ├── hooks/ # useOpenAPI, useAuth, useRequest, useSettings
124+ │ ├── layout/ # AppSidebar, Header, EnvironmentSwitcher, ViewToolbar, SelectionFab
125+ │ ├── endpoints/ # RouteCard, EndpointsView, FavoritesView, TryTab, DocTab, HistoryTab
126+ │ ├── models/ # ModelsView, ModelCard, ModelGraphView
127+ │ ├── schema/ # SchemaViewerView, SchemaTree, SchemaForm, SchemaInput
128+ │ ├── settings/ # SettingsDialog, ConnectionSettings, AuthSettings, StorageSettings
129+ │ ├── tools/ # ProjectToolsView (Diagnostics, Diff)
130+ │ ├── search/ # CommandPalette
131+ │ ├── share/ # ShareDialog
132+ │ └── editor/ # JsonEditor, CodeViewer
133+ ├── hooks/ # useOpenAPI, useAuth, useRequest, useSettings, useEnvironments,
134+ │ # useFavorites, useMultiEnvStatus
91135├── contexts/ # OpenAPIContext, AuthContext
92136├── lib/
93- │ └── openapi/ # Pure TS logic ( ref resolution, schema processing, v2 conversion)
94- └── locales/ # zh.ts, en.ts
137+ │ └── openapi/ # Parser, ref resolution, schema processing, route extraction, diff
138+ └── locales/ # en, zh_CN, zh_TW, zh_HK, ja, ko
95139```
96140
97141## License
0 commit comments