ruby-grape / ruby-grape/grape-entity
Type boolean in grape entity is not working with default
Open
Nobody has claimed this yet.
bug?
- Dominant language
- Ruby
- Stars
- 729
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
Hi, This code is not working
expose :active, documentation: { type: 'boolean', default: true, desc: 'If the code can be used'}
It is generating a schema as {"active": false}. Any Thing wrong with code?
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 reproducing the reported expose :active declaration and inspect the schema-generation path for boolean documentation defaults. Confirm the behavior with a focused regression test; the work is done when the generated schema contains active: true for the shown declaration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100