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
Given an optional request header with a default value, the current version of generator does NOT set a defaultValue on RequestHeader annotation, and does NOT set the generated type to an optional type (eg String? instead of String).
I've check the current mustache template, and the logic is indeed missing please check suggested fix below
openapi-generator version
7.10.0 through Gradle plugin
OpenAPI declaration file content or url
// ...paths:
/v1/configurations:
get:
summary: list all enabled configurationstags: ['configuration']operationId: getAllConfigurationsparameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PageSize'
- in: headername: x-tenantschema:
type: stringenum: ['de', 'at']default: 'de'responses:
200:
description: list all enabled configurationscontent:
application/json:
schema:
// ...
Generation Details
The current generator version, generate the followign Kotlin code
Description
Given an optional request header with a default value, the current version of generator does NOT set a defaultValue on RequestHeader annotation, and does NOT set the generated type to an optional type (eg String? instead of String).
I've check the current mustache template, and the logic is indeed missing please check suggested fix below
openapi-generator version
7.10.0 through Gradle plugin
OpenAPI declaration file content or url
Generation Details
The current generator version, generate the followign Kotlin code
Notice the generatd RequestHeader is missing a default value and type is not set to
String?
Suggest a fix
The current Java spring generator already has this logic, it need to be copied also for the Kotlin generator
Java mustache template file: modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache
The text was updated successfully, but these errors were encountered: