Add support for different response content types
See original GitHub issueSwagger supports different content types in the response like this:
/health:
get:
responses:
'200':
description: Successful response
content:
text/plain:
schema:
type: string
enum: ['UP','DOWN']
Currently it is not possible to define a response like this with fastify-swagger.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Add support for different content-type response #3902 - GitHub
With OAS3 is possible to answer with multiple content types with the same status code, but the field produces of Swagger 2 does...
Read more >Content-Type - HTTP - MDN Web Docs - Mozilla
In responses, a Content-Type header provides the client with the actual content type of the returned content. This header's value may be ...
Read more >Does the HTTP Protocol support multiple content types in ...
I'm wondering if I can return the response header. Content-Type: application/json text/ ...
Read more >Using content negotiation to serve multiple content types ... - IBM
Content negotiation is the method in which the client and server agree on the response content type to use. There are three types...
Read more >HTTP Content Negotiation in REST APIs
Another way to pass content type information to the server, the client may use the specific extension in resource URIs.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Currently we don’t. I think we should enable this, but I’m not exactly seeing how. Would you mind to do a proposal? A PR would even be better.
We might even be lacking support for this in fastify itself.
Il giorno mer 17 ott 2018 alle 10:22 Gyula Szalai notifications@github.com ha scritto:
produces
for response.