Skip to content

Commit 19b5eb0

Browse files
Merge pull request #2064 from micalevisk/feat/document-global-default-version
docs(): add instructions about using the global default version option
2 parents 050505f + 2790022 commit 19b5eb0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

content/techniques/versioning.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,19 @@ export class CatsController {
230230
}
231231
}
232232
```
233+
234+
#### Global default version
235+
236+
If you do not want to provide a version for each controller/or individual routes, or if you want to have a specific version set as the default version for every controller/route that don't have the version specified, you could set the `defaultVersion` as follows:
237+
238+
```typescript
239+
@@filename(main)
240+
app.enableVersioning({
241+
// ...
242+
defaultVersion: '1'
243+
// or
244+
defaultVersion: ['1', '2']
245+
// or
246+
defaultVersion: VERSION_NEUTRAL
247+
});
248+
```

0 commit comments

Comments
 (0)