We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Every POJO that is generated contains the following two imports in it:
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty;
5.3.1
openapi: 3.0.3 info: title: Api Documentation description: Api Documentation termsOfService: urn:tos contact: {} license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0 version: '1.0' paths: /thingy: get: operationId: get responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResponseList' components: schemas: ResponseList: type: array items: $ref: '#/components/schemas/ResponseEntry' ResponseEntry: type: object properties: id: type: string format: uuid name: type: string
Generator name: spring Config options: oas3 = true
import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.UUID; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import io.swagger.v3.oas.annotations.media.Schema; ...
import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.UUID; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import io.swagger.v3.oas.annotations.media.Schema; ...
The source of these two imports are the model.mustache file, particularly these lines:
model.mustache
{{#imports}}import {{import}}; {{/imports}}
Unfortunately, these are also pulling in other imports, eg.
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.UUID;
As a result, it is not trivial to try and circumvent this particular bug by tweaking the mustache files.
The text was updated successfully, but these errors were encountered:
Closed via #11181. Please pull the latest master to give it another try.
Sorry, something went wrong.
No branches or pull requests
Description
Every POJO that is generated contains the following two imports in it:
openapi-generator version
5.3.1
OpenAPI declaration file content or url
Generation Details
Generator name: spring
Config options: oas3 = true
Generated java code for ResponseEntry class
Expected java code for ResponseEntry class
Additional info
The source of these two imports are the
model.mustache
file, particularly these lines:Unfortunately, these are also pulling in other imports, eg.
As a result, it is not trivial to try and circumvent this particular bug by tweaking the mustache files.
The text was updated successfully, but these errors were encountered: