Skip to content

Commit 89d0187

Browse files
thogg4LeFnord
authored andcommitted
clarify hidden option in readme (ruby-grape#593)
* clarify hidden option in readme * update changelog * add both ways to hide an endpoint
1 parent 4c042b0 commit 89d0187

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* [#580](https://github.com/ruby-grape/grape-swagger/pull/580): Issue #578: fixes duplicated path params - [@LeFnord](https://github.com/LeFnord).
1414
* [#585](https://github.com/ruby-grape/grape-swagger/pull/585): Issue #584: do not mutate route.path - [@LeFnord](https://github.com/LeFnord).
1515
* [#586](https://github.com/ruby-grape/grape-swagger/pull/586): Issue #587: Parameters delimited by dash cause exception - [@risa](https://github.com/risa).
16+
* [#593](https://github.com/ruby-grape/grape-swagger/pull/593): Clarify hidden option in readme - [@thogg4](https://github.com/thogg4).
1617

1718
* Your contribution here.
1819

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,12 @@ You can hide an endpoint by adding ```hidden: true``` in the description of the
444444
desc 'Hide this endpoint', hidden: true
445445
```
446446

447+
Or by adding ```hidden: true``` on the verb method of the endpoint, such as `get`, `post` and `put`:
448+
449+
```ruby
450+
get '/kittens', hidden: true do
451+
```
452+
447453
Endpoints can be conditionally hidden by providing a callable object such as a lambda which evaluates to the desired
448454
state:
449455

0 commit comments

Comments
 (0)