Skip to content

min0625/openapi-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔍 OpenAPI Viewer

Render any OpenAPI/Swagger spec in your browser — no installation, no backend.

Demo Swagger UI License

繁體中文 | English

Usage

Pass any public OpenAPI/Swagger JSON or YAML URL via ?url=:

https://min0625.github.io/openapi-viewer/?url=https://petstore3.swagger.io/api/v3/openapi.json

Visiting without ?url= loads the bundled default spec. The Explore box updates ?url= on navigation, so every spec has a shareable, bookmarkable URL.

Supports Swagger 2.0, OpenAPI 3.0.x, and OpenAPI 3.1.x — JSON or YAML. Only http(s) and same-origin URLs are accepted.

Examples

Bundled specs under examples/ — the same Users API across all supported versions:

Version JSON YAML
Swagger 2.0 swagger-2.0.json · open swagger-2.0.yaml · open
OpenAPI 3.0 openapi-3.0.json · open openapi-3.0.yaml · open
OpenAPI 3.1 openapi-3.1.json · open openapi-3.1.yaml · open

CORS

The spec URL must allow cross-origin requests. GitHub Raw and Gist URLs work without CORS restrictions:

https://raw.githubusercontent.com/<user>/<repo>/<branch>/<path>
https://gist.githubusercontent.com/<user>/<gist-id>/raw/<file>

License

MIT — see LICENSE

Contributors

Languages