-
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
URL-encoding for operationRef #1677
Comments
The operationRef is a fragment identifier and we need to investigate if curly braces require escaping in that portion of a URL. Some of us think they don't but we will confirm. Change initial description of OperationRef to "A relative or absolute URI reference to an OAS operation. " It would be useful to add comments as to how this is different than a regular JSON Reference. |
According to RFC 3986,
This means the only way a curly brace can exist in a fragment is if it is percent-encoded. That makes me sad. |
@darrelmiller Thanks for clarifying. Do we also need to update the examples? |
Hi, I just went to https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#operationref-examples and there are still literal curly braces in the first two code blocks, so I was wondering whether a decision was made to relax the JSON Reference syntax requirement? |
@jeffory-orrok oof. Thanks, this needs fixing in 3.0.4 and 3.1.1. |
I was under the impression that operationRef does not need URL-encoding.
For example, in the following snippit taken directly from the link object documentation...
...
{
and}
are not encoded, i.e. replaced with%7B
and%7D
, like in the following:However, after talking to a developer of an OAS validator, I am doubtful... I was told that because operationRef is defined as a reference in the OAS, it needs URL-encoding.
Here is the link to the discussion. The last two exchanges are most important to this topic.
Could you clarify if operationRef needs URL-encoding?
The text was updated successfully, but these errors were encountered: