You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Refitter generates Refit interfaces from a OAS 3.0 spec file, it doesn't add the "Accept" header , which necesssary for ASP.NET Core's ProblemDetails Middleware to function properly.
According to OAS 3.0 specification, The content property in responses contains the MIME type expected in the response.
I'm suggesting to add an optional parameter addAcceptHeaders to add the accept header.
Examples
without addAcceptHeaders:
/// Multiple status values can be provided with comma separated strings
/// </summary>
[Get("/pet/findByStatus")]
Task<ICollection<Pet>> FindPetsByStatus([Query(CollectionFormat.Multi)] IEnumerable<Anonymous> status);
with addAcceptHeaders:
/// Multiple status values can be provided with comma separated strings
/// </summary>
[Headers("Accept: application/json")]
[Get("/pet/findByStatus")]
Task<ICollection<Pet>> FindPetsByStatus([Query(CollectionFormat.Multi)] IEnumerable<Anonymous> status);```
The text was updated successfully, but these errors were encountered:
When Refitter generates Refit interfaces from a OAS 3.0 spec file, it doesn't add the "Accept" header , which necesssary for ASP.NET Core's ProblemDetails Middleware to function properly.
According to OAS 3.0 specification, The
content
property inresponses
contains the MIME type expected in the response.I'm suggesting to add an optional parameter
addAcceptHeaders
to add the accept header.Examples
addAcceptHeaders
:addAcceptHeaders
:The text was updated successfully, but these errors were encountered: