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
We have an endpoint that NSwag is generating schema like this for:
"responses": { "200": { "description": "", "content": { "application/octet-stream": { "schema": { "type": "file" } } } }
The method signature is
[HttpPost] public async Task<IHttpActionResult> Callback( string trackingId, [FromBody] CallbackRequest body)
According to speccy and the spec here, the "type": "file" is not valid. The type should be string.
"type": "file"
string
Speccy gives error:
Specification schema is invalid. expected 'file' to be equals one of Array [ 'integer', 'number', 'string', 'boolean', 'object', 'array' ]
The text was updated successfully, but these errors were encountered:
Thanks for reporting, should be high prio and easy to fix
Sorry, something went wrong.
Add binary handling, RicoSuter/NSwag#2016
8535145
82add51
Will be in v12.0.16 soon
The "workaround" is to do what you should do anyway, and add some metadata to the action method, e.g.
[SwaggerResponse(HttpStatusCode.OK, typeof(void))] [SwaggerResponse(HttpStatusCode.BadRequest, typeof(string))]
No branches or pull requests
We have an endpoint that NSwag is generating schema like this for:
The method signature is
According to speccy and the spec here, the
"type": "file"
is not valid. The type should bestring
.Speccy gives error:
The text was updated successfully, but these errors were encountered: