-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Java] Use html entities in javadoc of generated code #106
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
To test it you can run the java codegen on petstore.json like this: JavaClientCodegen config = new org.openapitools.codegen.languages.JavaClientCodegen();
config.setArtifactId(artifactId);
config.setJava8Mode(true);
Path outputDirPath = Paths.get(outputDir);
config.setHideGenerationTimestamp(true);
config.setOutputDir(outputDir);
final OpenAPIParser openApiParser = new OpenAPIParser();
final ParseOptions options = new ParseOptions();
final OpenAPI openAPI = openApiParser.readLocation(inputSpec, null, options).getOpenAPI();
final ClientOptInput opts = new ClientOptInput();
opts.setConfig(config);
opts.setOpenAPI(openAPI);
opts.setOpts(new ClientOpts());
new DefaultGenerator().opts(opts).generate(); I get this change before and after the change: --- a/org/openapitools/client/api/PetApi.java
+++ b/org/openapitools/client/api/PetApi.java
@@ -295,7 +295,7 @@ public class PetApi {
}
/**
* Build call for findPetsByStatus
- * @param status Status values that need to be considered for filter (optional, default to new ArrayList<String>())
+ * @param status Status values that need to be considered for filter (optional, default to new ArrayList<String>())
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
@@ -356,7 +356,7 @@ public class PetApi {
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
- * @param status Status values that need to be considered for filter (optional, default to new ArrayList<String>())
+ * @param status Status values that need to be considered for filter (optional, default to new ArrayList<String>())
* @return List<Pet>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -368,7 +368,7 @@ public class PetApi {
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
- * @param status Status values that need to be considered for filter (optional, default to new ArrayList<String>())
+ * @param status Status values that need to be considered for filter (optional, default to new ArrayList<String>())
* @return ApiResponse<List<Pet>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -381,7 +381,7 @@ public class PetApi {
/**
* Finds Pets by status (asynchronously)
* Multiple status values can be provided with comma separated strings
- * @param status Status values that need to be considered for filter (optional, default to new ArrayList<String>())
+ * @param status Status values that need to be considered for filter (optional, default to new ArrayList<String>())
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object |
wing328
approved these changes
May 20, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check to see if we need to do something similar to C# templates.
jimschubert
added a commit
to jimschubert/openapi-generator
that referenced
this pull request
May 23, 2018
* master: (36 commits) jaxrs-cxf-cdi: fix outer enum (OpenAPITools#131) Move bash argv opt to end of ags line in scripts (OpenAPITools#124) Reduce CI logging (OpenAPITools#119) Download elm dependencies without prompting user. (OpenAPITools#118) [aspnetcore] Make the use of Swashbuckle optional (OpenAPITools#110) DefaultGenerator: fix NullPointerException (OpenAPITools#109) [Java] use html entities in javadoc of generated code (OpenAPITools#106) Update PULL_REQUEST_TEMPLATE.md [java] Enum in array of array (OpenAPITools#66) Rename datatype to dataType in CodegenProperty (OpenAPITools#69) update elm test to compile all elm files (OpenAPITools#95) Fix Petstore example for Elm (OpenAPITools#96) Update Docker documentation (OpenAPITools#97) CaseFormatLambda has been added, params for Rest-assured client has been refactored (OpenAPITools#91) Update integration.md [Clojure] Add util method to set the api-context globally (OpenAPITools#93) [JaxRS-Java] issue with implFolder on windows, and required fields generation for containers (OpenAPITools#88) Set parameters allowableValues dynamically (OpenAPITools#65) Meta: set version for "build-helper-maven-plugin" (OpenAPITools#89) Fix javadoc issues in "openapi-generator" module (OpenAPITools#84) ...
# for free
to join this conversation on GitHub.
Already have an account?
# 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/java-petstore-all.sh
master
.cc @bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01)
Description of the PR
Fix for #43: the javadoc should use html entities like
ArrayList<String>
and notArrayList<String>
for the maven build of the generated project to run without issue.