Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the min/max Items/Length fields if the attribute uses the length validator #934

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

dhruvCW
Copy link
Contributor

@dhruvCW dhruvCW commented Jun 22, 2024

Grape 2.1.0 Introduced the length validator . We can now use the length validator to specify the min/maxItems (for array types) and min/maxLength (for String types) for the attributes that use the validator in the generated swagger document.

Fixed test that was broken with rack 3 and restricted rack < 3 for grape < 2

@dhruvCW
Copy link
Contributor Author

dhruvCW commented Jun 22, 2024

Test failures seem unrelated to this PR 🤔 fixed the broken tests.

There grape < 2.0 seems to require rack < 3.0 and there was a test that didn't set it's body that was breaking with rack 3.

Copy link
Member

@LeFnord LeFnord left a comment

Choose a reason for hiding this comment

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

thanks @dhruvCW … yeah it makes sense

@LeFnord LeFnord merged commit a5e2575 into ruby-grape:master Jun 28, 2024
21 checks passed
@dhruvCW dhruvCW deleted the min_max_length branch June 28, 2024 07:20
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.

2 participants