-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Labels
enhancementNew feature or requestNew feature or requestfixedgeneratorIssues or improvements relater to generation capabilities.Issues or improvements relater to generation capabilities.
Milestone
Description
Where an OpenAPI operation only includes 204 in its successful responses, the generated method should be declared to effectively return void.
'/DoTheThing':
POST:
responses:
'204':
description: An empty response
x-csharp: Task DoTheThing.PostAsync(...); If at runtime, the server returns a different 2XX with a body, then we should read the body and then discard it. Failing to read the body will hang the server.
When a operation is expected to return a value, but instead returns a 204 at runtime (whether described or not), the returned value should be null.
'/nullableSimpleObject':
get:
responses:
'200':
description: A response with an object type response
content: { "application/json": { schema: { $ref: "#/components/schemas/simpleObject" }}}
'204':
description: A response with an object type but with null value
x-csharp: Task<SimpleObject> GetAsync(...); Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfixedgeneratorIssues or improvements relater to generation capabilities.Issues or improvements relater to generation capabilities.
Type
Projects
Status
Done ✔️