-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
priority: mediumMedium priorityMedium prioritystatus: blockedSomething prevents progressSomething prevents progresstype: featureNew feature or requestNew feature or requestworkload: daysLikely takes days to resolveLikely takes days to resolve
Milestone
Description
API endpoints can serve different content types, e.g., application/json, text/plain etc. Clients can ask a service to respond with one or more specific accepted content types.
It would be nice if FOCA implemented a solution (e.g., a decorator) that compares the client's desired content type(s) against the ones that the service offers for the respective endpoint (as defined in the API specs). An appropriate error response should be returned if a client requests a content type that the endpoint cannot deliver. If the client does not explicitly ask for a specific content type (i.e., if the Accept: <content-type> header is missing), the default response should be given.
Other important points to think about:
- Connexion may already take care of validating
Acceptheaders to some extent; on the other hand, it may also be the case that Connexion will complain if JSON-incompatible content types are to be returned - It needs to be checked how content is negotiated between client and server, especially in situations where the client/server accepts/offers multiple content types
Metadata
Metadata
Assignees
Labels
priority: mediumMedium priorityMedium prioritystatus: blockedSomething prevents progressSomething prevents progresstype: featureNew feature or requestNew feature or requestworkload: daysLikely takes days to resolveLikely takes days to resolve
Type
Projects
Status
Todo other