Skip to content

Commit

Permalink
Update CHANGELOG and README
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Schuster committed May 20, 2016
1 parent 79e8c50 commit 78d5372
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

#### Features

* Your contribution here.
* [#434](https://github.com/ruby-grape/grape-swagger/pull/434): Add summary to the operation object generator to be more compliant with [OpenAPI v2](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#operation-object) - [@aschuster3](https://github.com/aschuster3).

#### Fixes

* Your contribution here.

### 0.20.4 (May 16, 2016)

#### Features
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,32 @@ end
```
#### Overriding the route summary
By default, the route summary is filled with the value supplied to `desc`.
```ruby
namespace 'order' do
desc 'This will be your summary'
get :order_id do
...
end
end
```
To override the summary, add `summary: '[string]'` after the description.
```ruby
namespace 'order' do
desc 'This will be your summary',
summary: 'Now this is your summary!'
get :order_id do
...
end
end
```
#### Expose nested namespace as standalone route
Use the `nested: false` property in the `swagger` option to make nested namespaces appear as standalone resources.
Expand Down
3 changes: 0 additions & 3 deletions spec/support/model_parsers/entity_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ class RecursiveModel < Grape::Entity
'QueryInput' => {
'type' => 'object',
'properties' => { 'elements' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/QueryInputElement' }, 'description' => 'Set of configuration' } },
'summary' => 'nested route inside namespace',
'description' => 'nested route inside namespace'
},
'QueryInputElement' => {
Expand All @@ -302,7 +301,6 @@ class RecursiveModel < Grape::Entity
'ApiError' => {
'type' => 'object',
'properties' => { 'code' => { 'type' => 'integer', 'format' => 'int32', 'description' => 'status code' }, 'message' => { 'type' => 'string', 'description' => 'error message' } },
'summary' => 'This gets Things.',
'description' => 'This gets Things.'
},
'Something' => {
Expand All @@ -313,7 +311,6 @@ class RecursiveModel < Grape::Entity
'links' => { 'type' => 'link' },
'others' => { 'type' => 'text' }
},
'summary' => 'This gets Things.',
'description' => 'This gets Things.'
}
}
Expand Down
3 changes: 0 additions & 3 deletions spec/support/model_parsers/representable_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ class RecursiveModel < Representable::Decorator
'QueryInput' => {
'type' => 'object',
'properties' => { 'elements' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/QueryInputElement' }, 'description' => 'Set of configuration' } },
'summary' => 'nested route inside namespace',
'description' => 'nested route inside namespace'
},
'QueryInputElement' => {
Expand All @@ -371,7 +370,6 @@ class RecursiveModel < Representable::Decorator
'ApiError' => {
'type' => 'object',
'properties' => { 'code' => { 'type' => 'integer', 'format' => 'int32', 'description' => 'status code' }, 'message' => { 'type' => 'string', 'description' => 'error message' } },
'summary' => 'This gets Things.',
'description' => 'This gets Things.'
},
'Something' => {
Expand All @@ -382,7 +380,6 @@ class RecursiveModel < Representable::Decorator
'links' => { 'type' => 'array', 'items' => { 'description' => '', 'type' => 'link' } },
'others' => { 'description' => '', 'type' => 'text' }
},
'summary' => 'This gets Things.',
'description' => 'This gets Things.'
}
}
Expand Down

0 comments on commit 78d5372

Please sign in to comment.