aj-foster / open-api-generator

Open API code generator for Elixir
MIT License
97 stars 13 forks source link

Support schemas with allOf intersection types #36

Closed aj-foster closed 7 months ago

aj-foster commented 8 months ago

This change adds support for schemas with allOf intersecting types. It does this by naively merging the properties of the sub-schemas. This may not be appropriate in all circumstances.

Related to #35.

jinfiesto commented 7 months ago

Is the main concern here constructing illogical types? For example, if the combined allof resolves to a different type than the given type for a property?

aj-foster commented 7 months ago

That is a concern. Mostly I just haven't explored all of the interesting use-cases for allOf schemas, so this level of support might not be useful. But that's okay — we'll figure it out as we go.