Repository navigation
Included @gustavoapaz to founding members. - #47
Merged
Merged
Conversation
wing328
approved these changes
May 15, 2018
aserkes
pushed a commit
to aserkes/openapi-generator
that referenced
this pull request
Aug 29, 2022
Proposed implementation of fullProject property
nilskuhn
pushed a commit
to nilskuhn/openapi-generator
that referenced
this pull request
Apr 6, 2023
chore(deps): update dependency @types/jest to v26.0.14
Kunal8954
pushed a commit
to Kunal8954/openapi-generator
that referenced
this pull request
Sep 9, 2026
The escapeJavaDoc lambda is registered in the codegen lambda map, so
templates must invoke it as {{#lambda.escapeJavaDoc}}. The bare
{{#escapeJavaDoc}} reference never resolves in the render context,
silently dropping every default value from @PARAM Javadoc lines and
breaking the "Samples up-to-date" check.
Add a minimal wildcard-accept-header spec (Accept header defaulting to
*/*) and its generated okhttp-gson sample so the escaping is visible:
the value now renders as *&OpenAPITools#47;* instead of prematurely closing the
Javadoc block.
Also tighten EscapeJavaDocLambdaTest to exercise the lambda through the
lambda map in a nested defaultValue section, the real codegen pattern.
wing328
pushed a commit
that referenced
this pull request
Sep 23, 2026
* Escape JavaDoc default values safely Prevent generated Java clients from becoming invalid when OpenAPI default values contain a JavaDoc comment terminator. Co-authored-by: Copilot <[email protected]> * Escape default values in all JavaDoc templates Ensure every Java library template protects generated comments from default values containing a comment terminator. Co-authored-by: Copilot <[email protected]> * Keep native client line comments literal Avoid applying JavaDoc escaping to a regular source comment where it changes the displayed default value unnecessarily. Co-authored-by: Copilot <[email protected]> * escapeJavaDoc lambda: fix reference via lambda map key The escapeJavaDoc lambda is registered in the codegen lambda map, so templates must invoke it as {{#lambda.escapeJavaDoc}}. The bare {{#escapeJavaDoc}} reference never resolves in the render context, silently dropping every default value from @PARAM Javadoc lines and breaking the "Samples up-to-date" check. Add a minimal wildcard-accept-header spec (Accept header defaulting to */*) and its generated okhttp-gson sample so the escaping is visible: the value now renders as */* instead of prematurely closing the Javadoc block. Also tighten EscapeJavaDocLambdaTest to exercise the lambda through the lambda map in a nested defaultValue section, the real codegen pattern. * Fix java string example escaping for wildcard media types String example values are escaped for use inside a double-quoted Java string literal. Avoid mangling '*/' and '/*' (e.g. the '*/*' media type) by not applying escapeUnsafeCharacters, which is only needed for javadoc comment contexts. Also remove the unused HashMap import in EscapeJavaDocLambdaTest. --------- Co-authored-by: Kunal8954 <[email protected]> Co-authored-by: Copilot <[email protected]>
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.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.master.Description of the PR
Included @gustavoapaz to founding members.