We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Take the following example,
interface MyResquest { title: string; } interface MyResponse {...} type ApiSpec = Tspec.DefineApiSpec<{ paths: { "/endpoint": { post: { summary: "summary", description: "description", body: MyResquest , responses: { 201: MyResponse }, } } }, }>;
will result in the following,
"paths": { "/tasks": { "post": { "operationId": "...", "summary": "summary", "description": "description, "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" } }, "additionalProperties": false, "required": [ "title" ] } } } }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskResponse" } } } } } } } }
I'm expecting it to use $ref instead, as such,
"paths": { "/tasks": { "post": { "operationId": "...", "summary": "summary", "description": "description, "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MyRequest" } } } }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MyResponse" } } } } } } } }
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered:
hyeonss0417
No branches or pull requests
Describe the bug
Take the following example,
will result in the following,
I'm expecting it to use $ref instead, as such,
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: