You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Native Java client code generated by org.openapitools:openapi-generator-maven-plugin:7.13.0 with optional query params are not null tested prior to being 'toString()' called.
Generated code when not having a String input should wrap with a
if (Objects.isNonNull(clientCreated)) {
multiPartBuilder.addTextBody("clientCreated", clientCreated.toString());
}
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Description
Native Java client code generated by org.openapitools:openapi-generator-maven-plugin:7.13.0 with optional query params are not null tested prior to being 'toString()' called.
openapi-generator version
7.13.0
OpenAPI declaration file content or url
https://github.com/qld-gov-au/kiteworks-integration/blob/main/kiteworks-swagger-gen/src/main/resources/kiteworks.28.swagger.json
Generation Details
outputs
Steps to reproduce
Issues in generated code are
multiPartBuilder.addTextBody("clientCreated", clientCreated.toString());
multiPartBuilder.addTextBody("clientModified", clientModified.toString());
multiPartBuilder.addTextBody("disableAutoVersion", disableAutoVersion.toString());
multiPartBuilder.addTextBody("note", note.toString());
As inputs are
@jakarta.annotation.Nullable Boolean returnEntity
@jakarta.annotation.Nullable String mode
@jakarta.annotation.Nullable LocalDate clientCreated
@jakarta.annotation.Nullable LocalDate clientModified
@jakarta.annotation.Nullable Boolean disableAutoVersion
@jakarta.annotation.Nullable Boolean note
Related issues/PRs
Suggest a fix
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache#L487C65-L487C84
Generated code when not having a String input should wrap with a
if (Objects.isNonNull(clientCreated)) {
multiPartBuilder.addTextBody("clientCreated", clientCreated.toString());
}
The text was updated successfully, but these errors were encountered: