This is a discussion on request for improvement (not a bug).
For example for the Petstore demo, PetAPI class is generated as a inner class of PetstoreClientAPI:
extension PetstoreClientAPI {
public class PetAPI: APIBase {
Because of that, code to invoke a method of PetstoreClientAPI becomes a bit lengthy like the following:
let newPet = Pet()
...
PetstoreClientAPI.PetAPI.addPet(body: newPet).execute().then { response -> Void in
I'm wondering if this could just be PetAPI.addPet(body: newPet) without PetstoreClientAPI.?
Note that the model class Pet is not an inner class and can be accessed by just saying Pet. I don't see any strong reason for PetAPI being an inner class. What would you folks think?
This is a discussion on request for improvement (not a bug).
For example for the Petstore demo,
PetAPIclass is generated as a inner class ofPetstoreClientAPI:Because of that, code to invoke a method of
PetstoreClientAPIbecomes a bit lengthy like the following:I'm wondering if this could just be
PetAPI.addPet(body: newPet)withoutPetstoreClientAPI.?Note that the model class
Petis not an inner class and can be accessed by just sayingPet. I don't see any strong reason forPetAPIbeing an inner class. What would you folks think?