Skip to content

Commit f232574

Browse files
committed
docs(openapi): add descriptions about adding global parameters
1 parent 823ae41 commit f232574

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

content/openapi/other-features.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ const document = SwaggerModule.createDocument(app, options, {
1212
});
1313
```
1414

15+
#### Global parameters
16+
17+
You can add parameter definitions to all routes using `DocumentBuilder`:
18+
19+
```typescript
20+
const options = new DocumentBuilder().addGlobalParameters({
21+
name: 'tenantId',
22+
in: 'header',
23+
});
24+
```
25+
1526
#### Multiple specifications
1627

1728
The `SwaggerModule` provides a way to support multiple specifications. In other words, you can serve different documentation, with different UIs, on different endpoints.

0 commit comments

Comments
 (0)