ruby-grape / ruby-grape/grape

Header versioning using accept-extensions

Open
#386 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Ruby
Stars
10k
Forks
1.2k
Avg merge
14h 38m
Merged PRs (30d)
92

Description

I'd like to be able to use accept-extensions to declare the version number of my resources rather than baking the version into the mimetype.

Accept: application/vnd.myresource+json;version=0.1.0

The rack-accept gem does not implement accept-extensions, but there is an outstanding issue to fix this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how Grape currently parses Accept headers and the rack-accept gem's outstanding issue about accept-extensions. Confirm where version information is extracted and how API resource media types are matched. Done means clients can declare a resource version with an accept-extensions parameter such as version=0.1.0 rather than embedding it in the MIME type.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.