ruby-grape / ruby-grape/grape-swagger
Support "additionalProperties" on Object types
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
I'm not sure if OAS2 has this, I'd guess it does, but right now I'm looking for a way to support "freeform" objects being passed in.
For example, I have the option to pass in labels for my API:
# request payload
{ "labels": { "this":"is freeform", "no":"structure"}}
The labels key can have any type of keys/values passed into it. I'm looking for a way to document this using this gem. You can see this documented on Swagger here: https://swagger.io/docs/specification/data-models/data-types/#object (granted this is OAS3)
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
No file or test is named. Start by locating the gem's object-schema handling and compare its OAS2 behavior with the linked Swagger data-model guidance; determine how arbitrary keys and values should be represented. Done means the labels example can be documented as a freeform object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100