OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Is your feature request related to a problem? Please describe.
Given the following enum spec:
enum:
- HDD
- SSD
- NVME
type: string
The jaxrs-spec generator will generate an enum that does strict == comparisons, so if the specified API returns NVMe instead of NVME, the response will fail validation because"NVMe" != "NVME".
Describe the solution you'd like
The Java generator supports a useEnumCaseInsensitiveoption; when that option is enabled, the generator will use case-insensitive equality checks for string enums. Copying that feature into the jaxrs-spec generator would enable generator users to opt in to case-insensitive comparisons for string enums.
Is your feature request related to a problem? Please describe.
Given the following enum spec:
The jaxrs-spec generator will generate an enum that does strict
==
comparisons, so if the specified API returnsNVMe
instead ofNVME
, the response will fail validation because"NVMe" != "NVME"
.Describe the solution you'd like
The Java generator supports a
useEnumCaseInsensitive
option; when that option is enabled, the generator will use case-insensitive equality checks for string enums. Copying that feature into the jaxrs-spec generator would enable generator users to opt in to case-insensitive comparisons for string enums.Additional context
Relates to issue 16634