Commit 36e57594 by Xavier Ordoquy

Add documentation for the `get_schema_view` new argument: `patterns`

parent d757127e
...@@ -170,6 +170,22 @@ May be used to pass the set of renderer classes that can be used to render the A ...@@ -170,6 +170,22 @@ May be used to pass the set of renderer classes that can be used to render the A
renderer_classes=[CoreJSONRenderer, APIBlueprintRenderer] renderer_classes=[CoreJSONRenderer, APIBlueprintRenderer]
) )
#### `patterns`
List of url patterns to limit the schema introspection to. If you only want the `myproject.api` urls
to be exposed in the schema:
schema_url_patterns = [
url(r'^api/', include('myproject.api.urls')),
]
schema_view = get_schema_view(
title='Server Monitoring API',
url='https://www.example.org/api/',
patterns=schema_url_patterns,
)
## Using an explicit schema view ## Using an explicit schema view
If you need a little more control than the `get_schema_view()` shortcut gives you, If you need a little more control than the `get_schema_view()` shortcut gives you,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment