Skip to content

Commit

Permalink
Updated TUTORIAL.md for setting custom headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodolfo N. Duldulao, Jr committed Feb 20, 2019
1 parent 2e7a25c commit 4d40bd5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ swirl.describe(title="My REST API", description="Example API that does wonders",

```


Custom headers on the Swagger UI handlers and Spec:
```python
import tornado_swirl as swirl

swirl.describe(title="My REST API", description="Example API that does wonders",
swagger_ui_handlers_header=[
('Cache-Control', 'public'),
('Cache-Control', 'max-age=300')
],
swagger_spec_headers=[
('Cache-Control', 'no-cache')
],)

```


## Setting up Documenting Your Handlers and Models

Swirl derives OpenAPI 3.0 paths and components from your docstrings. At the moment Swirl only parses Google-style (like) formatted docstrings.
Expand Down

0 comments on commit 4d40bd5

Please sign in to comment.