Add documentation for the get_schema_view new argument: patterns

This commit is contained in:
Xavier Ordoquy 2017-04-19 07:49:13 +02:00
parent d757127e9a
commit 36e5759498

View File

@ -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]
)
#### `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
If you need a little more control than the `get_schema_view()` shortcut gives you,