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
I have this API defined as:
.WithOpenApi(openApi => { openApi.Responses.Add( StatusCodes.Status200OK.ToString(), new OpenApiResponse { Content = { ["application/octet-stream"] = new OpenApiMediaType { Schema = new OpenApiSchema { Type = "string", Format = "binary", }, } }, Headers = { ["X-MY-TOKEN"] = new OpenApiHeader { Description = "The token to acknowledge the message.", Required = true, Schema = new OpenApiSchema { Type = "string", }, } } }); return openApi; });
Which ends up generating a Swager 2.0 specification as:
"200": { "description": null, "schema": { "type": "string", "format": "binary" }, "headers": { "X-MY-TOKEN": { "required": true, "description": "The token to acknowledge the message.", "schema": { "type": "string" } } } }
However, there is no way in the generated C# client (latest version) to get the value of the X-MY-TOKEN HTTP header.
X-MY-TOKEN
Any hints?
The text was updated successfully, but these errors were encountered:
OOPS!, My bad!
It's in the FileResponse:
FileResponse
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class FileResponse : System.IDisposable { private System.IDisposable _client; private System.IDisposable _response; public int StatusCode { get; private set; } public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } public System.IO.Stream Stream { get; private set; } public bool IsPartial { get { return StatusCode == 206; } } public FileResponse(int statusCode, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.IO.Stream stream, System.IDisposable client, System.IDisposable response) { StatusCode = statusCode; Headers = headers; Stream = stream; _client = client; _response = response; } public void Dispose() { Stream.Dispose(); if (_response != null) _response.Dispose(); if (_client != null) _client.Dispose(); } }
Sorry, something went wrong.
No branches or pull requests
I have this API defined as:
Which ends up generating a Swager 2.0 specification as:
However, there is no way in the generated C# client (latest version) to get the value of the
X-MY-TOKEN
HTTP header.Any hints?
The text was updated successfully, but these errors were encountered: