Add mutually_exclusive groups.
Open
Nobody has claimed this yet.
feature request
- Dominant language
- Ruby
- Stars
- 10k
- Forks
- 1.2k
- Avg merge
- 14h 38m
- Merged PRs (30d)
- 92
Description
Some APIs have mutually exclusive groups.
optional :widget_id
optional :gadget_id
optional :gadget_type
mutually_exclusive :widget_id, gadget_id
mutually_exclusive :widget_id, gadget_type
get do
end
This gets out of control with a third mutually exclusive combination of options. We might want to write something like this.
optional :widget_id
group :gadget do
optional :gadget_id
optional :gadget_type
end
mutually_exclusive :widget, :gadget
get do
end
Contributor guide
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
Start by reviewing the existing mutually_exclusive and option-group entry points, then compare them with the proposed group :gadget syntax. Done means grouped options can be declared and the group can participate in mutually exclusive validation as shown in the examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100