Skip to content

[java-spring;kotlin-spring] fix values escaping - #24915

Draft
Picazsoo wants to merge 12 commits into
OpenAPITools:masterfrom
Picazsoo:bugfix/fix-values-escaping
Draft

[java-spring;kotlin-spring] fix values escaping#24915
Picazsoo wants to merge 12 commits into
OpenAPITools:masterfrom
Picazsoo:bugfix/fix-values-escaping

Conversation

@Picazsoo

@Picazsoo Picazsoo commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

PR checklist

  • Read the contribution guidelines.
  • 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.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Summary by cubic

Fixes double-escaping of OpenAPI values in the Spring and Kotlin Spring generators. Values were previously escaped during model construction and again in templates, producing artifacts like <= and \"; they are now preserved raw and escaped once for their output context.

Bug Fixes

  • Adds Java and Kotlin string-literal and documentation helpers for annotations, Javadocs, defaults, examples, paths, and enum wire values.
  • Preserves UUID parameter serialization and updates generated Spring samples with corrected documentation and full ISO date-time defaults.
  • Marks schema defaults that Spring form bindings cannot enforce as "OpenAPI schema default" in generated Javadocs.
  • Adds regression coverage; descriptions ending in whitespace may now produce an extra * line in generated Javadocs.

Written for commit 312a219. Summary will update on new commits.

Review in cubic

Picazsoo and others added 7 commits September 8, 2026 09:53
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Picazsoo
Picazsoo marked this pull request as ready for review September 9, 2026 11:46
@Picazsoo
Picazsoo marked this pull request as draft September 9, 2026 11:47

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 341 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Re-trigger cubic

Comment thread modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache Outdated
Comment thread modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache Outdated
Comment thread modules/openapi-generator/src/main/resources/kotlin-spring/cookieParams.mustache Outdated
Comment thread modules/openapi-generator/src/main/resources/kotlin-spring/apiController.mustache Outdated
Picazsoo and others added 2 commits September 9, 2026 14:23
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Picazsoo
Picazsoo marked this pull request as ready for review September 9, 2026 12:56
@Picazsoo
Picazsoo marked this pull request as draft September 9, 2026 12:57

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 339 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Re-trigger cubic

Comment thread modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Picazsoo
Picazsoo marked this pull request as ready for review September 9, 2026 13:29
@Picazsoo
Picazsoo marked this pull request as draft September 9, 2026 13:29

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 364 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

Re-trigger cubic

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Picazsoo
Picazsoo marked this pull request as ready for review September 9, 2026 14:07
@Picazsoo
Picazsoo marked this pull request as draft September 9, 2026 14:07

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 379 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Re-trigger cubic

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Picazsoo
Picazsoo marked this pull request as ready for review September 9, 2026 15:48
@Picazsoo
Picazsoo marked this pull request as draft September 9, 2026 15:49

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 379 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

Re-trigger cubic

@Picazsoo Picazsoo changed the title Bugfix/fix values escaping [java-spring;kotlin-spring] fix values escaping Sep 9, 2026
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.

1 participant