Open ashwini-desai opened 4 years ago
Problem:
The class generated for Request and Response models with type array should use List instead of Array
array
List
Array
paths: /pets: get: responses: '200': description: pet response application/json: schema: type: array items: $ref: '#/components/schemas/Pet' components: schemas: Pet: type: object required: - name properties: id: type: integer format: int64 name: type: string
For example, the above responses block and Pet schema would generate
override fun findPets(tags: Array<String>?, limit: Int?): Array<Pet> { return tags?.let { tagList -> petStore.filter { pet -> tagList.contains(pet.tag) } }?.toTypedArray() ?: arrayOf() }
We should update codegen to use List<*> as the return type instead
Problem:
The class generated for Request and Response models with type
array
should useList
instead ofArray
For example, the above responses block and Pet schema would generate
We should update codegen to use List<*> as the return type instead