I don't think this is related to api-gateway-secure-pet-store itself, but the problem we face can be reproduced easily with this repository.
It appears that the SDK generation of Api Gateway (iOS, Androïd) is not very smart when dealing with array of objects (Pets in this case). Instead of using the 'Pet' model as the item of the array, the SDK generates a third model called 'Pets_Item' which is exactly the same than 'Pet'.
This is very annoying for Client developers because they have to handle two different classes for the same domain depending of the services they call (GET /pets or GET/pets/{id}).
In result, they have to write patch to have something useable...and the magic suddenly disappears.
Do you think is there any way to avoid the third model by fixing something in the Swagger file ? We tried several changes but without any success.
Note that I discuss about that also here with @balakataws. Please tell me where is the best place to speak about that (since the code generation tool is not an opensource project).
Hi,
I don't think this is related to api-gateway-secure-pet-store itself, but the problem we face can be reproduced easily with this repository.
It appears that the SDK generation of Api Gateway (iOS, Androïd) is not very smart when dealing with array of objects (Pets in this case). Instead of using the 'Pet' model as the item of the array, the SDK generates a third model called 'Pets_Item' which is exactly the same than 'Pet'.
This is very annoying for Client developers because they have to handle two different classes for the same domain depending of the services they call (GET /pets or GET/pets/{id}).
In result, they have to write patch to have something useable...and the magic suddenly disappears.
Do you think is there any way to avoid the third model by fixing something in the Swagger file ? We tried several changes but without any success.