Skip to content

feat: optimize enum schema generation by grouping unit variants#1364

Closed
domenkozar wants to merge 2 commits intojuhaku:masterfrom
cachix:group-enums
Closed

feat: optimize enum schema generation by grouping unit variants#1364
domenkozar wants to merge 2 commits intojuhaku:masterfrom
cachix:group-enums

Conversation

@domenkozar
Copy link
Copy Markdown

This is just a prototype I've put together to see if I can unblock myself.

The general idea is that even if one of the enums is special, we generate the rest of enums as one.

Group simple unit enum variants into a single schema to reduce schema size and improve OpenAPI document readability. Complex unit variants with titles or descriptions remain individual schemas.
@domenkozar
Copy link
Copy Markdown
Author

I think it's better to solve this using simplifier pass: OpenAPITools/openapi-generator#21041

@domenkozar domenkozar closed this Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant