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
{{ message }}
This repository was archived by the owner on Aug 4, 2023. It is now read-only.
I am finding it impossible to limit the properties which can be sent in an object when using schema composition. By way of example, let's say we have an object with id, name and value properties. The id field is only set for records once they are created.
I would like to be able to use the same field definitions in all my schemas for consistency as I would have done with standard JSON Schema. To do this I usually create multiple partials and then reference them in my model schemas, like this:
Note that I need to redeclare the child record properties as properties of the toplevel record in order to workaround JSON Schema's limitations regarding additionalProperties. This works for JSON Schema, but with Swagger's validator I get a CHILD_DEFINITION_REDECLARES_PROPERTY error.
Is there a good reason for including this error? Can it be removed, or perhaps only enabled when validating the higher-level Swagger schema & ignored when validating JSON Schema model definitions?