You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
While generating openapi spec with enums having common prefix, the common prefix is skipped in the enum name. Eg:
ResourceTypeV1:
type: stringdescription: Defines a resource type to provision, it can be multiple resources e.g. DATABASE or TOPICenum:
- RESOURCE_ACCESS_REQUEST
- RESOURCE_ACCESS_GRANT
@shivam-lal-maersk there is an undocumented additionalProperty removeEnumValuePrefix.
Be aware for the maven plugin: as it is not documented in cliOptions, you need to use the additionalProperties: <additionalProperties>removeEnumValuePrefix=false</additionalProperties>
or
CodegenConstants contains the constants but the description is not used anywhere. So most probably a bug.
public static final String REMOVE_ENUM_VALUE_PREFIX = "removeEnumValuePrefix";
public static final String REMOVE_ENUM_VALUE_PREFIX_DESC = "Remove the common prefix of enum values";
I think it is very confusing to have some properties defined in additionalProperties when they should be configOptions.
There are several other undocumented properties or only available in the cli:
docExtension
ignoreFileOverride (--ignore-file-override in the cli)
Bug Report Checklist
Description
While generating openapi spec with enums having common prefix, the common prefix is skipped in the enum name. Eg:
Class generated:
Expected class generated:
openapi-generator version: 7.6.0
OpenAPI declaration file content or url
Generation Details
Using maven to generate. Below is the configuration for the openapi-generator-maven-plugin
Steps to reproduce
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: