json-schema-for-humans icon indicating copy to clipboard operation
json-schema-for-humans copied to clipboard

Feature Request - expanded allOf

Open jackpap opened this issue 3 years ago • 2 comments

In the generated doc, it would be nice that the allOf do not show up as such, but as a composed schema which is a concatenation of all the schemas in the allOf. This would hide the "allOf" from the reader of the documentation for whom allOf is not important since this is simply a syntax of the schema but not required in the json document being validated. Is this already a feature? If not would it be complicated to add?

jackpap avatar Jul 13 '22 11:07 jackpap

@jackpap do you have a schematic example of how this should look like?

allOf can contain if-then conditional branches, therefore the concatenation of its schemas doesn't make much sense in this case.

pspot2 avatar Oct 27 '22 23:10 pspot2

I would also love this feature. I have a peculiar schema where fragments of properties are shared among many variations, so I've modeled them as sort of referencable mix-ins that I slap together with an allOf; the mix-ins themselves are not something I'd prefer to surface as a "first class" schemas; I basically just want a way to merge the properties together.

jpage-godaddy avatar Jul 04 '24 04:07 jpage-godaddy