-
If you had something like this: # rest of api...
servers:
- url: http://petstore.swagger.io/
paths:
/pets:
get:
# rest of api... Assuming no other servers are specified at any level; what would the expected url be for a
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The specification requires that the URL template be appended (bolded in the spec), so the result would be |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion as it has been answered. |
Beta Was this translation helpful? Give feedback.
The specification requires that the URL template be appended (bolded in the spec), so the result would be
https://petstore.swagger.io//pets
. Of course, a tool can then choose to normalize URLs in accordance with RFC 3986, but that's outside of the scope of the OpenAPI Specification. Many web servers are configured to normalize such URLs internally (e.g. https://github.com/OAI//OpenAPI-Specification/discussions/3512 brings up this discussion, but still shows the//
betweenOAI
andOpenAPI-Specification
in the address bar for me).