You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should Base URI contain a trailing /? The arguments are summarised as follows:
Option 1: Base URI should not include the trailing /
This is the approach taken by Open API 3, where the relative path is appended (no relative URL resolution) to the Base URI. Simple appending is straightforward to implement and unambiguous, and is likely most common amongst implementations.
The Base URI specified in the dataset site would exactly match any OpenAPI machine-readable documentation.
With this approach it is possible to specify behaviour for the path / (as it is not part of the Base URI), which is likely why this is favoured for API documentation such as OpenAPI.
Actions required
Specification should be updated: the Base URI MUST NOT include a trailing /.
The specification should be updated to reference Open API, and make the approach of appending the Base URI to the defined relative path clear.
Tooling must be updated to not use a trailing /.
Validator must ensure Base URIs do not include a trailing /.
Option 2: Base URL should include the trailing /
This approach follows RFC3986, which is already indirectly cited in the current version of the specification, and involves formal relative URL resolution. Relative URL resolution has broad library support, and is compatible with browser behaviour. Simple appending is still possible given the nature of the endpoints defined in the specification.
The Base URI specified in the dataset site would differ from any OpenAPI machine-readable documentation.
Actions required
Specification should be updated: the Base URI MUST include a trailing /.
Relative paths referenced in the specification should be updated to be compatible with relative URL resolution e.g. ./order-quote-templates/{uuid} or order-quote-templates/{uuid}
Validator must ensure Base URIs include a trailing /.
The text was updated successfully, but these errors were encountered:
nickevansuk
changed the title
https://tools.ietf.org/html/rfc1808#section-4
Base URI and the trailing /Oct 13, 2020
Should Base URI contain a trailing
/
? The arguments are summarised as follows:Option 1: Base URI should not include the trailing
/
This is the approach taken by Open API 3, where the relative path is appended (no relative URL resolution) to the Base URI. Simple appending is straightforward to implement and unambiguous, and is likely most common amongst implementations.
The Base URI specified in the dataset site would exactly match any OpenAPI machine-readable documentation.
With this approach it is possible to specify behaviour for the path
/
(as it is not part of the Base URI), which is likely why this is favoured for API documentation such as OpenAPI.Actions required
/
./
./
.Option 2: Base URL should include the trailing
/
This approach follows RFC3986, which is already indirectly cited in the current version of the specification, and involves formal relative URL resolution. Relative URL resolution has broad library support, and is compatible with browser behaviour. Simple appending is still possible given the nature of the endpoints defined in the specification.
The Base URI specified in the dataset site would differ from any OpenAPI machine-readable documentation.
Actions required
/
../order-quote-templates/{uuid}
ororder-quote-templates/{uuid}
/
.The text was updated successfully, but these errors were encountered: