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
when api success, just response with a string value, but swagger simple cannt identy a simple string
// swagger:route GET /version getVersion // // get backend version // // Consumes: // // Produces: // - application/text // // Schemes: http, https // // Deprecated: false // // Responses: // 200: string
and got spec like
"responses": { "200": { "$ref": "#/responses/string" } }
swagger version: master go version: go1.19.8 OS: mac
The text was updated successfully, but these errors were encountered:
By default it wants you to specify headers and body. But you can prefix the response type with body: and then it will do the right thing
body:
// swagger:route GET /version getVersion // // get backend version // // Consumes: // // Produces: // - application/text // // Schemes: http, https // // Deprecated: false // // Responses: // 200: body:string
Sorry, something went wrong.
@casualjim thanks, but where can i find docs about this?
@casualjim not work
"responses": { "200": { "description": "string", "schema": { "$ref": "#/definitions/string" } } }
when use this spec to generate client, got error
unsupported type "invalid type"
No branches or pull requests
Problem statement
when api success, just response with a string value, but swagger simple cannt identy a simple string
Swagger specification
and got spec like
Environment
swagger version: master
go version: go1.19.8
OS: mac
The text was updated successfully, but these errors were encountered: