Conversation
Use one MAJOR.MINOR.PATCH (+ optional prerelease) pattern in the well-known schema and OpenAPI, fix examples, and require appending /v plus the exact advertised version. Closes CycloneDX#280. Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
Require MAJOR.MINOR.PATCH only and switch advertised-version examples to 1.0.0, per review on CycloneDX#280. Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
| Clients must pick any one of the endpoints listed in the `.well-known/tea` json | ||
| response. The client MUST pick an endpoint with the at least one version that is | ||
| supported by the client is using. The client MUST prioritize endpoints with the | ||
| response. The client MUST pick an endpoint with at least one version that is |
| response. The client MUST pick an endpoint with the at least one version that is | ||
| supported by the client is using. The client MUST prioritize endpoints with the | ||
| response. The client MUST pick an endpoint with at least one version that is | ||
| supported by the client. The client MUST prioritize endpoints with the |
| endpoints like these and if the priority field is present, the client SHOULD pick | ||
| the endpoint with the highest priority value (a float between 0 and 1). | ||
|
|
||
| The client MUST then construct the full URL to the API by selecting that highest |
| Examples: | ||
| 1. For TEI `urn:tei:uuid:products.example.com:d4d9f54a-abcf-11ee-ac79-1a52914d44b` | ||
| `https://api.teaexample.com/v0.2.0-beta.2/discovery?tei=urn%3Atei%3Auuid%3Aproducts.example.com%3Ad4d9f54a-abcf-11ee-ac79-1a52914d44b` | ||
| `https://api.teaexample.com/v1.0.0/discovery?tei=urn%3Atei%3Auuid%3Aproducts.example.com%3Ad4d9f54a-abcf-11ee-ac79-1a52914d44b` |
There was a problem hiding this comment.
This branch is still based on current main (URN). Would you prefer I update the TEI examples in this PR to the URL form now, or wait until #261 merges and then rebase/apply that change here?
There was a problem hiding this comment.
Wait and rebase after merge of URN removal
| "1.0.0" | ||
| ], | ||
| "description": "TEA OpenAPI Spec Version identifier, conforms to SemVer 2.0 (https://semver.org/)." | ||
| "description": "TEA OpenAPI Spec version identifier as full SemVer 2.0.0 MAJOR.MINOR.PATCH (https://semver.org/)." |
There was a problem hiding this comment.
You're changing regex to digits only but prose says "full SemVer". Full SemVer may have modifier and metadata. I suggest reverting this back actually and keeping previous regex (that was representing full SemVer per spec).
There was a problem hiding this comment.
agreed.I’ll restore a SemVer-accurate pattern and keep the 1.0.0 examples
| description: | | ||
| Supported TEA API versions at this server, without a leading `v`. Each value | ||
| is full SemVer 2.0.0 `MAJOR.MINOR.PATCH`. Clients select the highest mutually | ||
| supported version and append `/v` followed by that exact string. |
There was a problem hiding this comment.
See previous comment re: SemVer.
| example: ["0.2.0-beta.2", "1.0.0"] | ||
| pattern: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$' | ||
| description: TEA OpenAPI Spec version identifier (SemVer 2.0.0 MAJOR.MINOR.PATCH) | ||
| example: ["1.0.0"] |
There was a problem hiding this comment.
See previous comment re: SemVer.
Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
Summary
MAJOR.MINOR.PATCHfor advertised API versions in the well-known schema and OpenAPI1.0.0(including/v1.0.0construction)/v+ that exact stringCloses #280.
Thanks @taleodor