No way to describe a path-item with an empty URI path #4289
Replies: 2 comments 2 replies
-
@karenetheridge all must be prefixed with a slash, but there's no restriction on suffixing so I feel like I'm missing something here? Can you show an example of what sort of URL distinction can't be made right now? I think that this would work: paths:
/foo: # without trailing slash
/foo/: # with trailing slash AFAIK, the only thing you can't model is the bare hostname URL with an empty path component. Your path component in the OAS is always at least '/' because of the leading slash requirement (and that assumes a server URL with a completely empty path component). |
Beta Was this translation helpful? Give feedback.
-
To follow up... I dug into the RFCs to see how the path portion of the URI should be specified -- https://httpwg.org/specs/rfc7230.html#request-target, https://datatracker.ietf.org/doc/html/rfc9112#section-3.2.1 My reading of this is that the path form of the "request-target" portion of the HTTP message (on the "start-line") is that it MUST be prefaced with So perhaps we just need to amend the spec to allow for |
Beta Was this translation helpful? Give feedback.
-
@ralfhandl said in this thread that URLs with trailing slashes can be treated differently than those without... but we have no way of expressing that at present, as all entries under
/paths
must be prefixed with a slash (https://spec.openapis.org/oas/v3.1.1#patterned-fields). Is this something we want to be able to express?Beta Was this translation helpful? Give feedback.
All reactions