sway
sway copied to clipboard
Validate readOnly
We need to validate the readOnly
field: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#fixed-fields-13
This is actually quite difficult to implement. I'm not giving up but due to the difficulty, I'll likely park it alongside #28 and come back to it. Long story short, we would have to implement some of the JSON Schema parsing/validation just to support this. readOnly
is allowed any place a properties
property is allowed and that is infinitely nestable, in many locations (additionalProperties
, allOf
, items
, ...) and would basically mean writing a bit of complicated logic to make sure we handle things.