Swagger UI powered by Vite with built-in support for multiple APIs.
It's hard to beat Swagger UI when looking for a free way to visualize and interact with your OpenAPI APIs.
It is not trivial, though, to deploy Swagger UI or configure it to support multiple APIs.
This project changes that and pre-configures Vite and Swagger UI for you. Just bring your spec files and run.
- Clone this repo
git clone https://github.com/lukefernandez/vite-swagger-ui.git
- Install dependencies
cd vite-swagger-ui
pnpm install
-
Configure the
urls
array insrc/main.ts
to point to your JSON and/or YAML API spec files. Two examples are included that reference specs in thepublic/specs/
directory. -
Deploy and view as you would any other Vite project. Toggle between APIs using the dropdown at the top right of the page.
# Run development server
pnpm run dev
# Or build for production and preview
pnpm run build
pnpm run preview