Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: OpenAPI allow non-nominal cases in enum (#2578)
We used to collect the references of the child cases and fail in case we came across a case without a nominal ref. This is not needed to correctly generate the `pneOf` structure in the openapi document, but to include the children to the schemas. After the change, we simply skip cases without a nominal ref when collection children. This allows for schemas like `Enum2(String, Int)` to be turned into `oneOf: [string, int]` correctly. Obviously, there will be no child schemas in this case.
- Loading branch information