1

I'm using Json-editor for creating a page to edit a json schema.

I would like to set a property to be visible only if another property is set as true, for instance: property has_pets will rule the visibility of a pets array.

I was not able to find anything, only enforcing the validation field.

How can I write a schema definition to does not show a property based on another property value?

Daniel Santos
  • 14,328
  • 21
  • 91
  • 174
  • 1
    You can do this with the implication pattern https://stackoverflow.com/questions/38717933/jsonschema-attribute-conditionally-required/38781027#38781027 – Jason Desrosiers Aug 17 '18 at 04:34
  • Possible duplicate of [jsonSchema attribute conditionally required](https://stackoverflow.com/questions/38717933/jsonschema-attribute-conditionally-required) – Relequestual Aug 17 '18 at 08:31

0 Answers0