Open agmyrek opened 2 years ago
Defining an enum schema in parameters object will cause the following compiling error:
'cannot find symbol': allowableValues
You can see the causing code here:
https://github.com/OpenAPITools/openapi-generator/blob/5.3.x/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache
The field "allowableValues" no longer exists in the annotation @Parameter from io.swagger.v3.oas.annotations
@Parameter
io.swagger.v3.oas.annotations
5.3.1
openapi: 3.0.3 paths: /api/{myEnum}: post: parameters: - name: myEnum in: path required: true schema: $ref: '#/components/schemas/MyEnum' components: schemas: MyEnum: type: string enum: - A - B - C
I am using the maven plugin with the following config option:
<oas3>true</oas3>
generate with maven plugin
Remove "allowableValues" from the template and use the @Schema annotation
@Schema
@agmyrek thanks for reporting the issue. Can you please file a PR with the suggested fix?
Closed via #11181. Please pull the latest master to give it another try.
Description
Defining an enum schema in parameters object will cause the following compiling error:
'cannot find symbol': allowableValues
You can see the causing code here:
https://github.com/OpenAPITools/openapi-generator/blob/5.3.x/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache
The field "allowableValues" no longer exists in the annotation
@Parameter
fromio.swagger.v3.oas.annotations
openapi-generator version
5.3.1
OpenAPI declaration file content or url
Generation Details
I am using the maven plugin with the following config option:
<oas3>true</oas3>
Steps to reproduce
generate with maven plugin
Suggest a fix
Remove "allowableValues" from the template and use the
@Schema
annotation