-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce constraints for Server Object url fixed field #4272
base: v3.1-dev
Are you sure you want to change the base?
Conversation
Co-authored-by: Ralf Handl <[email protected]>
@ralfhandl thanks, what about the Scheme-Based Normalization issue? Do you think it is warranted to verbalize this into a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should wait until the next tdc to merge?
@baywet ping! check it out as well. |
I might have missed this, but this fixed should target 3.2 only? (cc: @ralfhandl , @lornajane ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, but I think the wrong branch is being targeted at the moment.
Some more context around the branches: I asked that same specific question on the TDC call a couple of weeks ago. The agreement we came to with @ralfhandl and @handrews was that, unless things are specific to a version of the spec, they should target 3.2-dev. Once 3.2-dev is released, all the changes that can be applied to 3.1 will be collected and applied in a single shot to avoid confusion. They might also be applied to 3.0, even though we agreed last time that 3.0.4 was the last release. |
How about something like "Server Object.url values that end with This relates to what we need to when matching request URIs against |
I went ahead with this suggestion, as it is something that is not obvious from reading the OpenAPI spec, but it becomes obvious for the tooling authors during implementations.
Server Object
.url
field is defined asA URL to the target host
.OpenAPI further stipulates:
Looking at RFC 3986, the
Server Object
.url
can be one of the following:Both of these non-terminals allow
query
andfragment
. But effectively, we cannot allow them as OpenAPI further stipulates:Appending to URL or resolved relative reference containing query or fragment will end up corrupting the resulting URL.
There is another aspect of
Server Object
.url
, and that's being Scheme-Based Normalization. When we define server URL ashttps://exmaple.com/
, the tooling tends to remove the last character from the URL, if the character=/
before the path fromPaths Object
is appended to it. This is possible because of equivalence as described by Scheme-Based Normalization.AFAICT we cannot apply Scheme-Based Normalization to URL like
http://example.com/initial-path
.http://example.com/initial-path
is not equivalent anymore tohttp://example.com/initial-path/
.I guess my question is, if we shouldn't restrict
Server Object
.url
not to end with explicit/
?