Skip to content

Commit

Permalink
Merge pull request #133 from openedx/hu/ent-7160
Browse files Browse the repository at this point in the history
fix: update 'api-docs/' endpoint
  • Loading branch information
brobro10000 authored Jul 5, 2023
2 parents 56d0b10 + 1bc2cce commit a3e4326
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion enterprise_subsidy/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def root(*path_fragments):
# Request the user's permissions in the ID token
EXTRA_SCOPE = ['permissions']

LOGIN_REDIRECT_URL = '/api-docs/'
LOGIN_REDIRECT_URL = '/api/schema/swagger-ui/'
# END AUTHENTICATION CONFIGURATION

# Set up system-to-feature roles mapping for edx-rbac.
Expand Down
3 changes: 0 additions & 3 deletions enterprise_subsidy/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,10 @@
re_path(r'^admin/clearcache/', include('clearcache.urls')),
re_path(r'^admin/', admin.site.urls),
re_path(r'^api/', include(api_urls)),
re_path(r'^api-docs(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'),
re_path(r'^api-docs/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
re_path(r'^auto_auth/$', core_views.AutoAuth.as_view(), name='auto_auth'),
re_path(r'', include('csrf.urls')), # Include csrf urls from edx-drf-extensions
re_path(r'^health/$', core_views.health, name='health'),
# DRF-spectacular routes below
# TODO: deprecate the `/api-docs/` route in favor of the routes below.
path('api/schema/', spectacular_view.as_view(), name='schema'),
path('api/schema/swagger-ui/', spec_swagger_view.as_view(url_name='schema'), name='swagger-ui'),
path('api/schema/redoc/', spec_redoc_view.as_view(url_name='schema'), name='redoc'),
Expand Down

0 comments on commit a3e4326

Please sign in to comment.