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
If there are two fields with a fixed name prop1 and prop2, you should probably just list them as properties.
This workaround loses clarity for documentation reader about these fields belonging to the same entity. Also induces spec code duplication (in required for validation and in properties to show up in docs, which should be in sync). Initial usecase is producing reusable object with urls to different formats and sizes of the same single image.
More generally speaking - I think we should not silently ignore fields from required, if these are not listed in properties
@Vasfed that's really more of a JSON Schema issue. Those fields are being handled as designed, but there's a proposal for a combination requiredProperties field that has a fair amount of support and seems targeted for the next draft. json-schema-org/json-schema-spec#846
When specifying
additionalProperties
fields asrequired
there's no indication of these.Example schema:
The text was updated successfully, but these errors were encountered: