Skip to content

Commit

Permalink
add specification extension option to info section #165
Browse files Browse the repository at this point in the history
  • Loading branch information
tfranzel committed Jan 30, 2021
1 parent 39132ed commit 7a7d8ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions drf_spectacular/plumbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def build_root_object(paths, components):
'info': {
'title': settings.TITLE,
'version': settings.VERSION,
**settings.EXTENSIONS_INFO,
},
'paths': {**paths, **settings.APPEND_PATHS},
'components': components
Expand Down
4 changes: 4 additions & 0 deletions drf_spectacular/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
# Optional: MUST contain 'url', may contain "description"
'EXTERNAL_DOCS': {},

# Arbitrary specification extensions attached to the schema's info object.
# https://swagger.io/specification/#specification-extensions
'EXTENSIONS_INFO': {},

# Oauth2 related settings. used for example by django-oauth2-toolkit.
# https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#oauth-flows-object
'OAUTH2_FLOWS': [],
Expand Down

0 comments on commit 7a7d8ab

Please sign in to comment.