Skip to content

Commit c1a935f

Browse files
Merge pull request #76 from spier/http_status_code_documentation
Adding documentation for swagger spec creation for HTTP status codes
2 parents 74a1eee + 0fe76f0 commit c1a935f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ desc "Reserve a virgin in heaven", {
140140
}
141141
```
142142

143+
You can also document the HTTP status codes that your API returns with this syntax:
144+
145+
``` ruby
146+
get '/', :http_codes => [
147+
[400, "Invalid parameter entry"],
148+
] do
149+
...
150+
end
151+
```
152+
143153
## Contributing to grape-swagger
144154

145155
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.

0 commit comments

Comments
 (0)