icerockdev / moko-network

Network components with codegeneration of rest api for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
151 stars 29 forks source link

allOf support #106

Closed Alex009 closed 3 years ago

Alex009 commented 3 years ago

Now for schema

allOf:
                  - $ref: "#/components/schemas/LimitIdResponse"
                  - type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: "#/components/schemas/Unit"

we got

@Serializable
public data class LimitIdResponse (
    @SerialName("unpassed_ids")
    val unpassedIds: kotlin.collections.List<kotlin.String>,

    @SerialName("limit")
    val limit: kotlin.Int,

    @SerialName("unpassed_external_ids")
    val unpassedExternalIds: kotlin.collections.List<kotlin.String>
) 

output. generator get only first item of allOf.