SwaggerCustomOptions
interface SwaggerCustomOptions {
useGlobalPrefix?: boolean
swaggerUiEnabled?: boolean
ui?: boolean
raw?: boolean | Array<'json' | 'yaml'>
swaggerUrl?: string
jsonDocumentUrl?: string
yamlDocumentUrl?: string
patchDocumentOnRequest?: <TRequest = any, TResponse = any>(req: TRequest, res: TResponse, document: OpenAPIObject) => OpenAPIObject
explorer?: boolean
swaggerOptions?: SwaggerUiOptions
customCss?: string
customCssUrl?: string | string[]
customJs?: string | string[]
customJsStr?: string | string[]
customfavIcon?: string
customSiteTitle?: string
customSwaggerUiPath?: string
validatorUrl?: string
url?: string
urls?: Record<'url' | 'name', string>[]
}
Properties
Property | Description |
---|---|
useGlobalPrefix?: boolean
|
If |
swaggerUiEnabled?: boolean
|
If |
ui?: boolean
|
If |
raw?: boolean | Array<'json' | 'yaml'>
|
If |
swaggerUrl?: string
|
Url point the API definition to load in Swagger UI. |
jsonDocumentUrl?: string
|
Path of the JSON API definition to serve.
Default: |
yamlDocumentUrl?: string
|
Path of the YAML API definition to serve.
Default: |
patchDocumentOnRequest?: <TRequest = any, TResponse = any>(req: TRequest, res: TResponse, document: OpenAPIObject) => OpenAPIObject
|
Hook allowing to alter the OpenAPI document before being served. It's called after the document is generated and before it is served as JSON & YAML. |
explorer?: boolean
|
If |
swaggerOptions?: SwaggerUiOptions
|
Additional Swagger UI options |
customCss?: string
|
Custom CSS styles to inject in Swagger UI page. |
customCssUrl?: string | string[]
|
URL(s) of a custom CSS stylesheet to load in Swagger UI page. |
customJs?: string | string[]
|
URL(s) of custom JavaScript files to load in Swagger UI page. |
customJsStr?: string | string[]
|
Custom JavaScript scripts to load in Swagger UI page. |
customfavIcon?: string
|
Custom favicon for Swagger UI page. |
customSiteTitle?: string
|
Custom title for Swagger UI page. |
customSwaggerUiPath?: string
|
File system path (ex: ./node_modules/swagger-ui-dist) containing static Swagger UI assets. |
validatorUrl?: string
|
|
url?: string
|
|
urls?: Record<'url' | 'name', string>[]
|