-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Bounty to sponsor the fix (example)
Description
We use the maven plugin to create our models and interfaces in spring boot.
I wanted to set an optional header parameter to a default value used on the server side. However, I can not define the string correctly. The output is always masked incorrectly with extra double quotes.
openapi-generator version
org.openapitools openapi-generator-maven-plugin 3.3.4OpenAPI declaration file content or url
components:
parameters:
XConsumerId:
in: header
name: x-consumer-id
description: 'filled by gateway'
required: false
schema:
type: string
default: "c1" # tried also c1 and 'c1'
example: c1
Generated code
@ApiParam(value = "filled by gateway" , defaultValue=""c1"") @RequestHeader(value="x-consumer-id", required=false) String xConsumerId
"" of defaultValue is not correct
Command line used for generation
Execute maven plugin
Steps to reproduce
Related issues/PRs
Suggest a fix
Reactions are currently unavailable