HttpApiSwagger.ts
HttpApiSwagger.ts overview
Section titled “HttpApiSwagger.ts overview”Swagger documentation UI for declarative HttpApi contracts.
This module mounts a browser-based Swagger UI route on an HttpRouter. The
page renders the OpenAPI document derived from the supplied HttpApi, so a
running application can expose interactive API documentation without writing a
separate OpenAPI file.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”layers
Section titled “layers”Mounts Swagger UI for an HttpApi at the configured path, defaulting to
/docs, using the OpenAPI specification generated from the API.
Signature
declare const layer: <Id extends string, Groups extends HttpApiGroup.Any>( api: HttpApi.HttpApi<Id, Groups>, options?: { readonly path?: `/${string}` | undefined }) => Layer.Layer<never, never, HttpRouter.HttpRouter>Since v4.0.0