You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #331 I've noticed that bravado-core has some custom logic to ensure that the x-nullable field is propagated in case of a reference object.
According to the JSON schema definition a reference object is meant to fully replace the current object with the referenced one. This means that siblings attributes of a reference objects can not be considered (the definition does not strictly define this behaviour, so the decision is delegated to the implementer).
I'm mentioning this as ensuring the propagation of x-nullable results in
additional custom code to handle in the library
possible lack of feature parity between usage of bravado_core.spec.Spec with internally_dereference_refs set to True or False
possible confusion on the users as certain vendor extension will be propagated and others not (ie. a schema like {'x-nullable': True, '$ref': '#/definitions/something', 'x-new': False} will have x-nullable propagated and x-new ignored)
My suggestion would be to remove this manual handling and to bump swagger-spec-validator to 2.4.0+ which adds a warning in case a sibling is identified into a reference object (Yelp/swagger_spec_validator#107)
⚠️ : this might break clients, so addressing this issue needs a major release
The text was updated successfully, but these errors were encountered:
While working on #331 I've noticed that bravado-core has some custom logic to ensure that the x-nullable field is propagated in case of a reference object.
According to the JSON schema definition a reference object is meant to fully replace the current object with the referenced one. This means that siblings attributes of a reference objects can not be considered (the definition does not strictly define this behaviour, so the decision is delegated to the implementer).
I'm mentioning this as ensuring the propagation of
x-nullable
results inbravado_core.spec.Spec
withinternally_dereference_refs
set toTrue
orFalse
{'x-nullable': True, '$ref': '#/definitions/something', 'x-new': False}
will havex-nullable
propagated andx-new
ignored)My suggestion would be to remove this manual handling and to bump swagger-spec-validator to 2.4.0+ which adds a warning in case a sibling is identified into a reference object (Yelp/swagger_spec_validator#107)
The text was updated successfully, but these errors were encountered: