Skip to content

Commit 896f97c

Browse files
committed
docs(): add instructions about using the global default version option
1 parent c7d05e2 commit 896f97c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

content/techniques/versioning.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,20 @@ export class CatsController {
230230
}
231231
}
232232
```
233+
234+
#### Global default version
235+
236+
If you do not want to provide a version to each controller/individual routes, or if you want to have some version as the default version for every controller/individual routes that does not have defined a version, you could enable versioning like the following:
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+
// and so on
248+
});
249+
```

0 commit comments

Comments
 (0)