-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Swagger.Next: Forbid properties other than $ref inside JSON Pointer #629
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
Comments
+ it's really easy to implement such check in JSON Schema just add |
👍 |
Parent: #579 |
@webron This issue is really different from #556 In any case, I think JSON Pointer compatibility is more important than this two issues put together. |
This issue is incompatible with JSON Pointer because it adds a restriction that JSON Pointer doesn't have. If the JSON Pointer's spec writer wanted to disallow extra properties, they would have used different wording in the spec. I believe the wording there was intentional and we should not ignore it. And considering this feature wants to restrict JSON Pointer more than it is, and #556 calls for the opposite... |
I'm removing the meta issue from this--it's really part of our larger discussion about JSON schema support. |
Yeah, the |
Tackling PR: #741 |
We've decided to follow the JSON Reference spec for our own Reference Object, and as such, allow additional properties, but saying they will be ignore per the spec. |
@webron Just an FYI because it's easy to overlook, draft-wright-json-schema-00 absorbs JSON Reference but preserves that behavior with respect to additional properties. It also restricts https://tools.ietf.org/html/draft-wright-json-schema-00#section-7 |
@handrews thanks for the pointer. We noticed that and explicitly mention in our spec that |
From JSON Reference:
So technically JSON Reference doesn't forbid this behaviour, but it only makes the situation worse.
Since people expect different behaviour and it split lib/tools into two camps.
Ones who replace the reference and one who iterates through
$ref
s.@whitlockjc I believe you have some background on this issue.
The text was updated successfully, but these errors were encountered: