Disabled renaming to camelcase for generateInterfaces/DataClasses functions - #1922
Merged
Conversation
koperagen
reviewed
Jul 8, 2026
| /** | ||
| * Performs no name normalization. | ||
| * | ||
| * (Inside the actual code generation, [ValidFieldName] is still used to prevent incompilable code from being generated) |
Collaborator
There was a problem hiding this comment.
I think "actual" is a bit confusing, please try to reformulate without it
koperagen
reviewed
Jul 8, 2026
| * (such as a nullable enum, whose nullability is defined by the type and cannot be removed by | ||
| * making a property required). Returns `false` for primitives and non-nullable markers. | ||
| */ | ||
| internal fun FieldType.refersToNullableMarker(getRefMarker: GetRefMarker, topInterfaceName: ValidFieldName): Boolean { |
Collaborator
There was a problem hiding this comment.
What caused tests to start failing? Is it because of changes in name normalization?
Collaborator
Author
There was a problem hiding this comment.
No, because I removed snakeToLowerCamelCase() inside openapi-generator. I'm not exactly sure why, but it suddenly generated override val eye_color: EyeColor in Cat when I removed @ColumnName, which is incorrect because in the supertype eye_color is nullable. Adding this fix avoids that issue. Cat and Pet now have the same nullability for eye_color and since Cat : Pet, the property is omitted once again in the generation.
tiny update to the docs
…n't require ColumnName as much
Jolanrensen
force-pushed
the
name-normalizer
branch
from
July 8, 2026 12:26
c092110 to
8b13b8c
Compare
Allex-Nik
approved these changes
Jul 9, 2026
This file contains hidden or 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
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.
Fixes #1921
Changed
NameNormalizer.defaulttoid()instead of renameToCamelCase by delimiter.I also tried to change this behavior in
openapi-generator, since it also automatically renames accessors to camel case. This uncovered a bug with nullability, but that was also fixable.