Bug Report Checklist
Description
- In
DeviceRenderOptions.kt, We have enum class SdkUiType(val value: kotlin.Array<kotlin.String>) which is probably because of using Handlebars {{ stuff }} instead of {{{ stuff }}}.
- In
DeviceRenderOptions.kt, Enum class SdkUiType takes in an array instead of a String as an input even though schema specifies strings.
- In
PaymentMethodsRequest we have val additionalData: AnyOfLessThanAdditionalDataCommonCommaAdditionalData3DSecureGreaterThan? = null which tries to be the representation of anyOf. It's clearly wrong as such class does not even exist and actually generated classes AdditionalDataCommon and AdditionalData3DSecure have no connection in it.
openapi-generator version
4.2.3
OpenAPI declaration file content or url
codegen_failure.yaml.zip
Command line used for generation
openapi-generator generate -Dmodels -g kotlin-server -i codegen_failure.yaml -o /tmp/openapi/kotlin-server/
Steps to reproduce
- Run command line generation,
- Observe that Kotlin classes are invalid Kotlin.
Related issues/PRs
Suggest a fix
- Fix Handlebars templates. I think this is done is some issue that I cannot find.
- Take in strings instead of an array.
- Ideally the case would be represented in Kotlin as a sealed class AnyOfPaymentMethodsRequestAdditionalData with those subclasses.
Bug Report Checklist
Description
DeviceRenderOptions.kt, We have enum classSdkUiType(val value: kotlin.Array<kotlin.String>) which is probably because of using Handlebars{{ stuff }}instead of{{{ stuff }}}.DeviceRenderOptions.kt, Enum class SdkUiType takes in an array instead of a String as an input even though schema specifies strings.PaymentMethodsRequestwe haveval additionalData: AnyOfLessThanAdditionalDataCommonCommaAdditionalData3DSecureGreaterThan? = nullwhich tries to be the representation ofanyOf. It's clearly wrong as such class does not even exist and actually generated classesAdditionalDataCommonandAdditionalData3DSecurehave no connection in it.openapi-generator version
4.2.3
OpenAPI declaration file content or url
codegen_failure.yaml.zip
Command line used for generation
openapi-generator generate -Dmodels -g kotlin-server -i codegen_failure.yaml -o /tmp/openapi/kotlin-server/Steps to reproduce
Related issues/PRs
Suggest a fix