json-schema-merge-allof icon indicating copy to clipboard operation
json-schema-merge-allof copied to clipboard

Need a config option to allow not merging certain `allOf` schemas

Open eliaslevy opened this issue 4 years ago • 0 comments

allOf schemas using multiple conditional schemas using if, then, and else cannot be merged. E.g.

  allOf:
    - if:   { properties: { foo: { const: true } } }
      then: { required: [ bar ] }
    - if:   { properties: { xyz: { const: true } } }
      then: { required: [ abc ] } 

There is no way to write a resolver for if and then.

If would be useful to have an option that tell the library to skip trying to resolve certain schema keys and leave them in the allOf.

eliaslevy avatar Jul 04 '20 19:07 eliaslevy