You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can configure Swagger UI by passing the options object which fulfills the `ExpressSwaggerCustomOptions` (if you use express) interface as a fourth argument of the `SwaggerModule#setup` method.
134
+
You can configure Swagger UI by passing the options object which fulfills the `SwaggerCustomOptions` interface as a fourth argument of the `SwaggerModule#setup` method.
135
135
136
136
```TypeScript
137
-
exportinterfaceExpressSwaggerCustomOptions {
137
+
exportinterfaceSwaggerCustomOptions {
138
+
/**
139
+
* If `true`, Swagger resources paths will be prefixed by the global prefix set through `setGlobalPrefix()`.
140
+
* Default: `false`.
141
+
* @seehttps://docs.nestjs.com/faq/global-prefix
142
+
*/
143
+
useGlobalPrefix?:boolean;
144
+
145
+
/**
146
+
* If `false`, only API definitions (JSON and YAML) will be served (on `/{path}-json` and `/{path}-yaml`).
147
+
* This is particularly useful if you are already hosting a Swagger UI somewhere else and just want to serve API definitions.
148
+
* Default: `true`.
149
+
*/
150
+
swaggerUiEnabled?:boolean;
151
+
152
+
/**
153
+
* Url point the API definition to load in Swagger UI.
154
+
*/
155
+
swaggerUrl?:string;
156
+
157
+
/**
158
+
* Path of the JSON API definition to serve.
159
+
* Default: `<path>-json`.
160
+
*/
161
+
jsonDocumentUrl?:string;
162
+
163
+
/**
164
+
* Path of the YAML API definition to serve.
165
+
* Default: `<path>-json`.
166
+
*/
167
+
yamlDocumentUrl?:string;
168
+
169
+
/**
170
+
* Hook allowing to alter the OpenAPI document before being served.
171
+
* It's called after the document is generated and before it is served as JSON & YAML.
0 commit comments