OpenAPI
PrismOpenAPIGenerator produces OpenAPI 3.0 specifications from endpoint definitions, and PrismOpenAPIMiddleware serves them as JSON alongside a Swagger UI playground. Document your API once, get interactive docs and client generation for free.
Quick Setup
Serve API Docs
Defining Endpoints
Endpoint with Parameters
Parameters
Parameter Locations
Request Bodies
Request Body
Complete API Documentation
Full API Example
Custom Paths
Custom Spec and Docs Paths
Generate JSON Programmatically
Generate Spec
The Swagger UI is loaded from a CDN. Your server must have internet access for the docs page to render. The OpenAPI JSON spec at
/openapi.json works offline.