-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced 'TODO' hardcoded version info by a parameter with default '0…
….1.0' (#6899)
- Loading branch information
1 parent
b3f032f
commit e57c150
Showing
6 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,8 @@ urlpatterns = [ | |
# * Provide view name for use with `reverse()`. | ||
path('openapi', get_schema_view( | ||
title="Your Project", | ||
description="API for all things …" | ||
description="API for all things …", | ||
version="1.0.0" | ||
), name='openapi-schema'), | ||
# ... | ||
] | ||
|
@@ -72,6 +73,7 @@ The `get_schema_view()` helper takes the following keyword arguments: | |
|
||
* `title`: May be used to provide a descriptive title for the schema definition. | ||
* `description`: Longer descriptive text. | ||
* `version`: The version of the API. Defaults to `0.1.0`. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
carltongibson
Collaborator
|
||
* `url`: May be used to pass a canonical base URL for the schema. | ||
|
||
schema_view = get_schema_view( | ||
|
@@ -137,6 +139,7 @@ Arguments: | |
|
||
* `title` **required**: The name of the API. | ||
* `description`: Longer descriptive text. | ||
* `version`: The version of the API. Defaults to `0.1.0`. | ||
* `url`: The root URL of the API schema. This option is not required unless the schema is included under path prefix. | ||
* `patterns`: A list of URLs to inspect when generating the schema. Defaults to the project's URL conf. | ||
* `urlconf`: A URL conf module name to use when generating the schema. Defaults to `settings.ROOT_URLCONF`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wondering if we should default this to the empty string?