Skip to content

Commit abdd294

Browse files
committed
Address review comments
- Fix compatibility table versions (grape-swagger >= 2.0.0, grape-entity >= 1.0.0 for 0.7.x) - Fix file path in architecture.md (lib/grape-swagger/entity.rb) - Add missing array options (min_items, max_items, unique_items) - Clarify Custom Model Description is a grape-swagger feature
1 parent 777460e commit abdd294

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This gem is tested with the following versions:
6262

6363
| grape-swagger-entity | grape-swagger | grape-entity | grape |
6464
|---------------------|---------------|--------------|---------|
65-
| 0.7.x | >= 1.2.0 | >= 0.6.0 | >= 1.3 |
65+
| 0.7.x | >= 2.0.0 | >= 1.0.0 | >= 1.3 |
6666
| 0.6.x | >= 1.2.0 | >= 0.6.0 | >= 1.3 |
6767

6868
## Installation
@@ -97,7 +97,7 @@ end
9797

9898
### Custom Model Description
9999

100-
Override the default "{ModelName} model" description by defining a `self.documentation` method (requires grape-swagger >= 2.2.0):
100+
Override the default "{ModelName} model" description by defining a `self.documentation` method. This feature is handled by [grape-swagger](https://github.com/ruby-grape/grape-swagger) (requires grape-swagger >= 2.2.0):
101101

102102
```ruby
103103
class UserEntity < Grape::Entity

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Grape::Entity class
6262

6363
## Integration Point
6464

65-
Registered with grape-swagger in `lib/grape-swagger-entity.rb`:
65+
Registered with grape-swagger in `lib/grape-swagger/entity.rb`:
6666

6767
```ruby
6868
GrapeSwagger.model_parsers.register(GrapeSwagger::Entity::Parser, Grape::Entity)

docs/documentation-options.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ The `documentation` hash in entity exposures supports the following options:
2727
| `maximum` | Maximum value for numeric types | `100` |
2828
| `min_length` | Minimum length for strings | `1` |
2929
| `max_length` | Maximum length for strings | `255` |
30+
| `min_items` | Minimum items for arrays | `1` |
31+
| `max_items` | Maximum items for arrays | `10` |
32+
| `unique_items` | Array items must be unique | `true` |
3033

3134
## Display Options
3235

0 commit comments

Comments
 (0)