-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set removeEnumValuePrefix to false by default #20452
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wing328
changed the title
et removeEnumValuePrefix to false by default
Set removeEnumValuePrefix to false by default
Jan 13, 2025
This was referenced Jan 13, 2025
danhumphreys-moj
added a commit
to ministryofjustice/hmpps-approved-premises-api
that referenced
this pull request
Jan 23, 2025
In version 7.7 generating documentation via the openApi gradle task results in the following misleading warning: "More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored." See comments on this [PR](OpenAPITools/openapi-generator#19646). In later versions of the plugin - and rather than fixing the issue - the severity of the warning has been reduced from [WARN to DEBUG](https://github.com/OpenAPITools/openapi-generator/pull/19646/files). Also set removeEnumValuePrefix = true since this is a new additional property added to more recent versions which removes the prefix for enum definitions. Previously in version 7.7 prefixes were removed automatically and the property didn't exist. Since it [defaults to false](OpenAPITools/openapi-generator#20452), we need to set it to true. Unfortunately this property isn't documented in the [README](OpenAPITools/openapi-generator#20452).
danhumphreys-moj
added a commit
to ministryofjustice/hmpps-approved-premises-api
that referenced
this pull request
Jan 23, 2025
In version 7.7 generating documentation via the openApi gradle task results in the following misleading warning: "More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored." See comments on this PR: OpenAPITools/openapi-generator#19646. In later versions of the plugin - and rather than fixing the issue - the severity of the warning has been reduced from WARN to DEBUG. See: https://github.com/OpenAPITools/openapi-generator/pull/19646/files. Also set removeEnumValuePrefix = true since this is a new additional property added to more recent versions which removes the prefix for enum definitions. Previously in version 7.7 prefixes were removed automatically and the property didn't exist. Since it defaults to false we need to set it to true. See OpenAPITools/openapi-generator#20452). Unfortunately this property isn't documented in the README OpenAPITools/openapi-generator#20452.
danhumphreys-moj
added a commit
to ministryofjustice/hmpps-approved-premises-api
that referenced
this pull request
Jan 23, 2025
In version 7.7 generating documentation via the openApi gradle task results in the following misleading warning: "More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored." See comments on this PR: OpenAPITools/openapi-generator#19646. In later versions of the plugin - and rather than fixing the issue - the severity of the warning has been reduced from WARN to DEBUG. See: https://github.com/OpenAPITools/openapi-generator/pull/19646/files. Also set removeEnumValuePrefix = true since this is a new additional property added to more recent versions which removes the prefix for enum definitions. Previously in version 7.7 prefixes were removed automatically and the property didn't exist. Since it defaults to false we need to set it to true. See OpenAPITools/openapi-generator#20452. Unfortunately this property isn't documented in the README https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/kotlin-server.md#config-options.
danhumphreys-moj
added a commit
to ministryofjustice/hmpps-approved-premises-api
that referenced
this pull request
Jan 23, 2025
In version 7.7 generating documentation via the openApi gradle task results in the following misleading warning: "More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored." See comments on this PR: OpenAPITools/openapi-generator#19646. In later versions of the plugin - and rather than fixing the issue - the severity of the warning has been reduced from WARN to DEBUG. See: https://github.com/OpenAPITools/openapi-generator/pull/19646/files. Also set removeEnumValuePrefix = true since this is a new additional property added to more recent versions which removes the prefix for enum definitions. Previously in version 7.7 prefixes were removed automatically and the property didn't exist. Since it defaults to false we need to set it to true. See OpenAPITools/openapi-generator#20452. Unfortunately this property isn't documented in the README https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/kotlin-server.md#config-options.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cc @OpenAPITools/generator-core-team
To fallback, simply set the option to true
e.g.
--additional-properties removeEnumValuePrefix=true
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)