-
Notifications
You must be signed in to change notification settings - Fork 161
Support discriminator inference for oneOf with a nested sum type #1013
Copy link
Copy link
Closed
Labels
area: genGenerator issuesGenerator issuesenhancementNew feature or requestNew feature or requestopenapi-featuresOpenAPI features support issuesOpenAPI features support issues
Description
Description
Given the following schema in the attached gist, implement discriminator inference on the root type where the nested oneOf contains another sum type (in this case, another oneOf)
At the moment the library only allows Struct types to be inferred, and we call s.JSON().Fields() to detect which fields are common/unique.
I believe this issue could be solved by collecting common fields of all possible elements of the CreateThing type, instead of simply calling s.JSON().Fields() within schema_gen_sum.go.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: genGenerator issuesGenerator issuesenhancementNew feature or requestNew feature or requestopenapi-featuresOpenAPI features support issuesOpenAPI features support issues