Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukefernandez/vite-swagger-ui
Swagger UI powered by Vite with built-in support for multiple APIs.
https://github.com/lukefernandez/vite-swagger-ui
Last synced: 2 days ago
JSON representation
Swagger UI powered by Vite with built-in support for multiple APIs.
- Host: GitHub
- URL: https://github.com/lukefernandez/vite-swagger-ui
- Owner: lukefernandez
- License: mit
- Created: 2024-07-26T23:20:00.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T18:27:47.000Z (5 months ago)
- Last Synced: 2024-08-28T16:25:30.136Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 380 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- fucking-awesome-vite - vite-swagger-ui - Swagger UI with built-in support for multiple APIs. (Get Started / Templates)
- awesome-vite - vite-swagger-ui - Swagger UI with built-in support for multiple APIs. (Get Started / Templates)
README
# vite-swagger-ui
> Swagger UI powered by Vite with built-in support for multiple APIs.
## What this is
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.
## How to use it
1. Clone this repo
```bash
git clone https://github.com/lukefernandez/vite-swagger-ui.git
```2. Install dependencies
```bash
cd vite-swagger-ui
pnpm install
```3. Configure the `urls` array in `src/main.ts` to point to your JSON and/or YAML API spec files. Two examples are included that reference specs in the `public/specs/` directory.
4. Deploy and view as you would any other Vite project. Toggle between APIs using the dropdown at the top right of the page.
```bash
# Run development server
pnpm run dev# Or build for production and preview
pnpm run build
pnpm run preview
```## Demo
![Demo](./demo.gif)