Bug Report Checklist
Description
I updated openapi-generator from 4.0.1 to 4.0.2. Then, I found generated api interface from same spec is different between 4.0.1 and 4.0.2.
For some reason, @RequestParam is not generated for api parameters. Here is an example.
@ApiParam(value = "", allowableValues = "json, csv, tsv", defaultValue = "json")
@Valid
@RequestParam(value = "format", required = false, defaultValue = "json")
Format format
@ApiParam(value = "", allowableValues = "json, csv, tsv", defaultValue = "json")
@Valid
Format format
openapi-generator version
4.0.2
OpenAPI declaration file content or url
openapi: 3.0.2
info:
title: info
description: info
version: 0.1.0
paths:
/example/api:
get:
summary: summary
description: description
parameters:
- $ref: '#/components/parameters/requiredQueryParam'
- $ref: '#/components/parameters/formatParam'
responses:
200:
description: response
content:
application/json:
schema:
type: string
components:
parameters:
requiredQueryParam:
description: set query
in: query
name: query
required: true
schema:
type: string
formatParam:
description: set format
in: query
name: format
required: false
schema:
$ref: '#/components/schemas/format'
schemas:
format:
default: json
description: response format
enum:
- json
- csv
type: string
Command line used for generation
$ mvn clean package
$ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ./simple-example-spec/openapi.spec -g spring -o output
Steps to reproduce
Generate api code for spring with 4.0.1 and 4.0.2. Then compare the api parameters of api interface.
Related issues/PRs
I couldn't find any similar issues.
Suggest a fix
Bug Report Checklist
Description
I updated openapi-generator from 4.0.1 to 4.0.2. Then, I found generated api interface from same spec is different between 4.0.1 and 4.0.2.
For some reason,
@RequestParamis not generated for api parameters. Here is an example.openapi-generator version
4.0.2
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Generate api code for spring with 4.0.1 and 4.0.2. Then compare the api parameters of api interface.
Related issues/PRs
I couldn't find any similar issues.
Suggest a fix