Skip to content

Commit fe7ccd5

Browse files
author
Tim Vandecasteele
committed
Add notion of hidden endpoints in documentation
1 parent ee5ff94 commit fe7ccd5

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

CHANGELOG.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Fix: translate parameter `type` to String, enables using Mongoid fields as parameter definitions - [@dblock](https://github.com/dblock).
44
* Adding support for generating swagger responseClass and models from Grape Entities - [@calebwoods](https://github.com/calebwoods).
5+
* Adding hidden endpoints - [@arturoherrero](https://github.com/arturoherrero).
56
* Your Contribution Here
67

78
### 0.6.0 (June 19, 2013)

README.markdown

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ You can pass a hash with some configuration possibilities to ```add_swagger_docu
5353

5454
## Swagger Header Parameters
5555

56-
Swagger also supports the documentation of parameters passed in the header. Since grape's ```params[]``` doesn't return header parameters we can
57-
to specify header parameters seperately in a block after the description.
56+
Swagger also supports the documentation of parameters passed in the header. Since grape's ```params[]``` doesn't return header parameters we can specify header parameters seperately in a block after the description.
5857

5958
``` ruby
6059
desc "Return super-secret information", {
@@ -70,7 +69,18 @@ desc "Return super-secret information", {
7069
}
7170
}
7271
```
73-
### Grape Entities
72+
73+
## Hiding an endpoint
74+
75+
You can hide an endpoint by adding ```:hidden => true``` in the description of the endpoint:
76+
77+
``` ruby
78+
desc 'Hide this endpoint', {
79+
:hidden => true
80+
}
81+
```
82+
83+
## Grape Entities
7484

7585
Add the [grape-entity](https://github.com/agileanimal/grape-entity) gem to our Gemfile.
7686
Please refer to the [grape-entity documentation](https://github.com/gileanimal/grape-entity/blob/master/README.markdown)

0 commit comments

Comments
 (0)