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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Duplicate @serializable annotation for generated data class. which lead to error This annotation is not repeatable.
openapi-generator version
openapi-generator-gradle-plugin 7.10.0
OpenAPI declaration file content or url
schemas:
AuthCallbackResponse:
type: objectdescription: The authentication's details.x-schemaName: AuthCallbackResponserequired:
- locationproperties:
location:
type: stringtitle: locationdescription: The location to redirect the user to for further authentication with the third-party provider.AuthResponse:
type: objectdescription: The authentication's details.x-schemaName: AuthResponserequired:
- tokenproperties:
token:
type: stringtitle: tokendescription: The JWT token used for registration or authentication.paths:
/auth/customer/{auth_provider}:
post:
operationId: PostActor_typeAuth_providersummary: Authenticate Customerdescription: | Authenticate a customer and receive the JWT token to be used in the header of subsequent requests. When used with a third-party provider, such as Google, the request returns a `location` property. You redirect to the specified URL in your storefront to continue authentication with the third-party service.externalDocs:
url: https://docs.medusajs.com/v2/storefront-development/customers/login#1-using-a-jwt-tokendescription: 'Storefront development: How to login as a customer'x-authenticated: falseparameters:
- name: auth_providerin: pathdescription: The provider used for authentication.required: trueschema:
type: stringexample: emailpassrequestBody:
content:
application/json:
schema:
type: objectdescription: The input data necessary for authentication. For example, for email-pass authentication, pass `email` and `password` properties.properties:
email:
type: stringpassword:
type: stringtags:
- Authresponses:
'200':
description: OKcontent:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AuthResponse'
- $ref: '#/components/schemas/AuthCallbackResponse'x-kotlin-discriminator:
token: AuthResponselocation: AuthCallbackResponse
Generation Details
gradle configration
val generatedSourcesPath ="$buildDir/generated"val apiDescriptionFile ="${projectDir}/src/medusaOpenApiOnlyStore.yaml"val apiRootName ="com.medusa"
openApiGenerate {
generatorName.set("kotlin")
inputSpec.set(apiDescriptionFile)
outputDir.set("${rootDir.absolutePath}/kotlin-client")
apiPackage.set("$apiRootName.api")
invokerPackage.set("$apiRootName.invoker")
modelPackage.set("$apiRootName.model")
additionalProperties.set(
mapOf(
"library" to "multiplatform",
"dateLibrary" to "kotlinx-datetime",
"serializationLibrary" to "kotlinx_serialization"
)
)
}
generated code
/** * The authenticated customer's details. * * @param user */
@Serializable@Serializable
data classAuthStoreSessionResponse (
@SerialName(value ="user") @Required valuser:StoreCustomer
) {
}
anwarpro
changed the title
[BUG] Description
[BUG] Duplicate @serializable annotation for generated data class (kotlinx-serialization)
Jan 19, 2025
anwarpro
changed the title
[BUG] Duplicate @serializable annotation for generated data class (kotlinx-serialization)
[BUG][kotlin] Duplicate @serializable annotation for generated data class (kotlinx-serialization)
Jan 19, 2025
Bug Report Checklist
Description
Duplicate @serializable annotation for generated data class. which lead to error This annotation is not repeatable.
openapi-generator version
openapi-generator-gradle-plugin 7.10.0
OpenAPI declaration file content or url
Generation Details
gradle configration
generated code
Here need only on @serializable annotation
Steps to reproduce
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: