-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Labels
enhancementNew feature or requestNew feature or requestopenapi-featuresOpenAPI features support issuesOpenAPI features support issues
Description
Description
When enum or const don't have a type set, ogen could infer the type by examining the values. Enums and consts implicitly constrain the type space, so type is redundant for them.
So for example if all values are strings, infer string type, if there are different types, only then use any, etc.
Also, when the type is not set for an enum or const, could see if the inference yields primitive types, and only when it does not, issue "non-primitive enum", otherwise let it pass.
References
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestopenapi-featuresOpenAPI features support issuesOpenAPI features support issues