swift-openapi-generator
swift-openapi-generator copied to clipboard
Revisit structure at runtime of allOf/oneOf/anyOf
Structure at runtime of allOf/oneOf/anyOf - today, we use nesting of structs to represent the nested schemas.
Could be represented as a single flattened struct that conforms to multiple protocols, one for each nested type, or some other way.
Things to keep in mind:
- lack of nested protocols in Swift
- cost of using existentials vs concrete types
allOf - is like inheritance but with struct it would be like big struct with embed fields from parent struct :)