Skip to content

Commit

Permalink
rootfile naming according to OpenAPI 3.0 guidelines, explicit endpoin…
Browse files Browse the repository at this point in the history
…t for yml and json schema
  • Loading branch information
MichalGawor committed Sep 5, 2023
1 parent 962a20b commit dd6aff7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dogconfig/dogproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
SPECTACULAR_SETTINGS = {
'TITLE': 'Digital Object Gate',
'DESCRIPTION': 'DOG API resolving referenced resources in the metadata',
'VERSION': '1.0.0',
'VERSION': '1.0.1',
'SERVE_INCLUDE_SCHEMA': False,
# OTHER SETTINGS
}
Expand Down
6 changes: 4 additions & 2 deletions dogconfig/dogproject/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
"""

from django.urls import include, path, re_path
from drf_spectacular.views import SpectacularAPIView
from drf_spectacular.views import SpectacularAPIView, SpectacularJSONAPIView
from rest_framework.permissions import AllowAny

from dogapi.views_api import fetch, identify, is_pid, sniff
from dogui.views_ui import home


urlpatterns = [
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
re_path(r'api/openapi.yml', SpectacularAPIView.as_view(), name='openapi_schema_yml'),
re_path(r'api/openapi.json', SpectacularJSONAPIView.as_view(), name='openapi_schema_json'),

path('api/fetch/', fetch, name='fetch'),
path('api/identify/', identify, name='identify'),
path('api/sniff/', sniff, name='sniff'),
Expand Down

0 comments on commit dd6aff7

Please sign in to comment.