Instant Visualization
Firestone provides a built-in, zero-config way to visualize your API using Swagger UI. This is perfect for local development and rapid prototyping.
Command:
firestone generate --resources users.yaml openapi --ui-server
What Happens:
- Firestone generates the OpenAPI spec in memory.
- It launches a local web server (default:
http://127.0.0.1:8080). - It serves a pre-configured Swagger UI instance pointed at your generated spec.
Hosting Swagger UI in Production
For production, you typically want to serve the documentation alongside your API.
- Generate the Spec File:
firestone generate ... openapi > openapi.yaml - Serve with your Backend: Most modern frameworks have easy integrations to serve this file via Swagger UI.
- FastAPI: Automatic (docs are built-in).
- Flask/Django: use libraries like
flasggerordrf-yasg. - Static: Use the Swagger UI Docker image and mount your
openapi.yaml.
For advanced customization (theming, plugins, OAuth2 redirect handling), consult the Swagger UI Configuration Docs.