JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
ensure_correct_media_type does not set response Content-Type to application/vnd.api+json
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.3k
- Forks
- 546
- PR merge metrics
- No merged PRs in 30d
Description
I noticed that when the ensure_correct_media_type before_action is run, and validation fails (Content-Type is not application/vnd.api+json, that the response from the server has a Content-Type header set to application/json. According to the spec, shouldn't this failed validation also return a Content-Type header of application/vnd.api+json?
Thanks ahead of time for the help.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the ensure_correct_media_type before_action and trace the response built when validation fails because Content-Type is not application/vnd.api+json. Check the existing response handling and tests, if present. Done means that failed validation returns a response with the application/vnd.api+json Content-Type required by the JSON:API specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100