Skip to content

Commit a722d1e

Browse files
docs(versioning): run prettier (formatting)
1 parent 264a03e commit a722d1e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

content/techniques/versioning.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ The `key` property should be the key and separator of the key-value pair that co
9292
> info **Hint** The `VersioningType` enum is available to use for the `type` property and is imported from the `@nestjs/common` package.
9393
9494
#### Custom Versioning Type
95+
9596
Custom Versioning uses any aspect of the request to specify the version (or versions). The incoming request is analyzed
9697
using an `extractor` function that returns a string or array of strings.
9798

@@ -101,14 +102,12 @@ lowest.
101102

102103
If an empty string or array is returned from the `extractor`, no routes are matched and a 404 is returned.
103104

104-
For example, if an incoming request specifies it supports versions `1`, `2`, and `3`, the `extractor` **MUST** return `[3,
105-
2, 1]`. This ensures that the highest possible route version is selected first.
105+
For example, if an incoming request specifies it supports versions `1`, `2`, and `3`, the `extractor` **MUST** return `[3, 2, 1]`. This ensures that the highest possible route version is selected first.
106106

107107
If versions `[3, 2, 1]` are extracted, but routes only exist for version `2` and `1`, the route that matches version `2`
108108
is selected (version `3` is automatically ignored).
109109

110-
> warning **Notice** Selecting the highest matching version based on the array returned from `extractor`
111-
> **does not reliably work** with the Express adapter due to design limitations. A single version (either a string or
110+
> warning **Notice** Selecting the highest matching version based on the array returned from `extractor` > **does not reliably work** with the Express adapter due to design limitations. A single version (either a string or
112111
> array of 1 element) works just fine in Express. Fastify correctly supports both highest matching version
113112
> selection and single version selection.
114113

0 commit comments

Comments
 (0)