Open
Description
Given the following definition
"/someurl": {
"get": {
"operationId": "someId",
"tags": ["tag"],
"parameters": [
{
"name": "thing",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Yes",
"content": {
"application/json": {
"schema": {
"$ref": "someschema"
}
}
}
},
"204": {
"description": "Empty"
}
}
}
}
we get the following interface method in the api
someId(params: {
pathParams: { thing: string };
}): Promise<someschema>;
The ACTUAL values that can be returned are someschema OR a Response object with status 204.
It would be preferable for the api to reflect this, or, even better, if the actual return value was
someschema or void, i.e.
someId(params: {
pathParams: { thing: string };
}): Promise<someschema | void>;
Metadata
Metadata
Assignees
Labels
No labels