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

Add support for minItems, maxItems and uniqueItems #37

Merged
merged 5 commits into from
Nov 26, 2018

Conversation

fotos
Copy link
Contributor

@fotos fotos commented Nov 23, 2018

Adds support for minItems, maxItems and uniqueItems for Arrays (is_array: true) as described in the Schema Object of the OpenAPI 2.0 specification.

The grape-entity documentation mentions that the documentation bubbles up but this is not the case for the above attributes.

@fotos fotos force-pushed the array-min-max-unique-items branch 2 times, most recently from e63604e to ee3f775 Compare November 23, 2018 12:35
Copy link
Collaborator

@kzaitsev kzaitsev left a comment

Choose a reason for hiding this comment

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

Thank you, looks good, but but we need to keep consistency and use snake_case

lib/grape-swagger/entity/attribute_parser.rb Outdated Show resolved Hide resolved
spec/grape-swagger/entity/attribute_parser_spec.rb Outdated Show resolved Hide resolved
spec/grape-swagger/entity/attribute_parser_spec.rb Outdated Show resolved Hide resolved
spec/grape-swagger/entity/attribute_parser_spec.rb Outdated Show resolved Hide resolved
spec/grape-swagger/entity/attribute_parser_spec.rb Outdated Show resolved Hide resolved
spec/grape-swagger/entity/attribute_parser_spec.rb Outdated Show resolved Hide resolved
spec/grape-swagger/entity/attribute_parser_spec.rb Outdated Show resolved Hide resolved
spec/grape-swagger/entity/attribute_parser_spec.rb Outdated Show resolved Hide resolved
spec/grape-swagger/entity/attribute_parser_spec.rb Outdated Show resolved Hide resolved
lib/grape-swagger/entity/attribute_parser.rb Outdated Show resolved Hide resolved
@fotos
Copy link
Contributor Author

fotos commented Nov 26, 2018

@Bugagazavr agreed, let's use snake_case.

GitHub failed (a bit) committing the suggestions, I'll rebase / squash by hand.

@fotos fotos force-pushed the array-min-max-unique-items branch from 1f10e17 to 22d2272 Compare November 26, 2018 18:57
@fotos
Copy link
Contributor Author

fotos commented Nov 26, 2018

@Bugagazavr done, let me know if more changes are necessary.

Fixed a few more typos 😱 and DRY'ed code to #add_array_documentation to please 🤖👮.

@kzaitsev kzaitsev merged commit d7de70f into ruby-grape:master Nov 26, 2018
@kzaitsev
Copy link
Collaborator

Thank you

@kzaitsev
Copy link
Collaborator

released

@fotos fotos deleted the array-min-max-unique-items branch November 26, 2018 19:59
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