Skip to content

Conversation

@bogdan
Copy link

@bogdan bogdan commented Dec 6, 2025

After update to grape 3.0, hidden attributes started to appear inside required params. I am not sure why hidden parameters were not required when the same version of grape-swagger-entity was used with earlier versions of grape-swagger. But I think it requires a fix anyway.

The bug was likely introduced here: b2a7b90

cc @numbata

Copy link
Collaborator

@numbata numbata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! I ran into this same issue yesterday and started working on a fix on the grape-swagger side as well. I think both fixes deserve to exist - yours handles it properly at the grape-swagger-entity side (where the root cause is), while the grape-swagger fix will act as a safeguard for similar issues that might come from other grape-swagger-* gems, not just grape-swagger-entity. Merging!

@numbata
Copy link
Collaborator

numbata commented Dec 6, 2025

@bogdan Can you update CHANGELOG.md ?

- Update `required_params` method to skip hidden attributes when determining required parameters.
- Modify `response_model_spec` to reflect changes in required attributes, removing `hidden_attr`.
- Add a test in `parser_spec` to ensure hidden attributes are not marked as required.
@numbata
Copy link
Collaborator

numbata commented Dec 6, 2025

@dblock Hi! I found that the GitHub token hardcoded in the Danger workflows (in grape-swagger-entity and other grape repos) has expired. The token is returning 401 Bad credentials when Danger tries to authenticate. Do you have a new token available? If so, instead of hardcoding it in the workflow, can we store a new one as a repository secret (DANGER_TOKEN) and referencing it via ${{ secrets.DANGER_TOKEN }} to keep it out of version control?

@dblock
Copy link
Member

dblock commented Dec 6, 2025

@numbata I opened ruby-grape/grape#2630 with some details, feel free to pick it up! In the meantime removing danger or ignoring it is probably the easiest way, but I'd prefer a real fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants