Closed wing328 closed 9 years ago
In the Petstore example, the operation addPet has a body parameter, which refers to the Pet model: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/test/resources/2_0/petstore.json#L43
addPet
body
Pet
The body field is marked as optional (required=false).
My questions is that should the body field for this particular example set to required?
Currently the ruby code looks like this: add_pet(:body => pet)
add_pet(:body => pet)
Ideally it should look like add_pet(pet)
add_pet(pet)
It should probably be required in this specific use case. Please open an issue on swagger-core for that and we'll fix it.
Opened swagger-api/swagger-core#990
In the Petstore example, the operation
addPet
has abody
parameter, which refers to thePet
model: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/test/resources/2_0/petstore.json#L43The body field is marked as optional (required=false).
My questions is that should the body field for this particular example set to required?
Currently the ruby code looks like this:
add_pet(:body => pet)
Ideally it should look like
add_pet(pet)