Skip to content

Conversation

msnteixeira
Copy link
Contributor

@msnteixeira msnteixeira commented Jun 24, 2025

In summary, the Kotlin code generator is not sanitizing enum values correctly. This occurs for hyphenated values where it gets translated to Minus. This attempts to fix #21181

@wing328 @dr4ke616 @karismann @Zomzog @andrewemery @4brunu @yutaka0m @stefankoppier @e5l

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    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.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@msnteixeira msnteixeira marked this pull request as ready for review June 24, 2025 14:37
@4brunu
Copy link
Contributor

4brunu commented Jun 24, 2025

Hi, CI is failing, can you please check and fix it?
I think you need to run those commands:

./mvnw clean package || exit
./bin/generate-samples.sh ./bin/configs/*.yaml || exit
./bin/utils/export_docs_generators.sh || exit

Thanks

@msnteixeira
Copy link
Contributor Author

@4brunu I ran the commands and there's changes in ~7k files that removes -SNAPSHOT prefix. This might have to do with previous commit that did not update the samples. Do you still want me to proceed with this?

@4brunu
Copy link
Contributor

4brunu commented Jun 24, 2025

Yes please, to see if CI passes

@msnteixeira
Copy link
Contributor Author

@4brunu Can I get a workflow approval from a maintainer?

Aside from building the samples I also made these changes since I was getting the same error as #21450. This should probably fix the issue, though it should be handled in a separate PR.

@msnteixeira
Copy link
Contributor Author

Hey @4brunu, can I get another workflow approval from a maintainer? I went back to the original changes that this PR intends to make since the problem seems to have been fixed in 046be5d.

@4brunu
Copy link
Contributor

4brunu commented Jun 25, 2025

Done

@4brunu 4brunu merged commit d911a71 into OpenAPITools:master Jun 25, 2025
14 checks passed
@4brunu
Copy link
Contributor

4brunu commented Jun 25, 2025

Thanks for the contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Kotlin code generator should sanitize enum values according to convention
3 participants