You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to generate a csharp client using Swagger 2.0 and Swagger Codegen v2.4.21. My Swagger file describes API responses with different schemas based on status codes:
Models are generated for both schemas, however the model for the 400 response code is not used anywhere in the generated client. Is this expected behavior? I would have expected code to be generated to actually create objects based on the JSON returned with the 400 status code. Any help would be greatly appreciated. Thanks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I am trying to generate a csharp client using Swagger 2.0 and Swagger Codegen v2.4.21. My Swagger file describes API responses with different schemas based on status codes:
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/AppointmentAddResult"
400:
description: "Bad request"
schema:
$ref: "#/definitions/BatchAppointmentAddErrorBody"
Models are generated for both schemas, however the model for the 400 response code is not used anywhere in the generated client. Is this expected behavior? I would have expected code to be generated to actually create objects based on the JSON returned with the 400 status code. Any help would be greatly appreciated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions