Skip to content

Commit

Permalink
drf-spec update
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBekendam committed Oct 24, 2022
1 parent 2e6f19a commit 96a761a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1,585 deletions.
26 changes: 15 additions & 11 deletions src/nrc/api/schema.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
from django.conf import settings

from drf_yasg import openapi

description = f"""
__all__ = [
"TITLE",
"DESCRIPTION",
"CONTACT",
"LICENSE",
"VERSION",
]
TITLE = f"{settings.PROJECT_NAME} API"
DESCRIPTION = f"""
The API consists of three parts:
1. **Publishing events (resource Events)** <br> The events resource is based on the [GOV NL profile for CloudEvents](https://vng-realisatie.github.io/NL-GOV-profile-for-CloudEvents).
This specification only contains brief descriptions of the attributes of the event. Please refer to the GOV NL profile for additional information.
Expand All @@ -13,11 +19,9 @@
This specification is work in progress. It can be changed completely without notice.
"""

info = openapi.Info(
title=f"{settings.PROJECT_NAME} API",
default_version=settings.API_VERSION,
description=description,
license=openapi.License(
name="EUPL 1.2", url="https://opensource.org/licenses/EUPL-1.2"
),
)
CONTACT = {
"email": "[email protected]",
"url": settings.DOCUMENTATION_URL,
}
LICENSE = {"name": "EUPL 1.2", "url": "https://opensource.org/licenses/EUPL-1.2"}
VERSION = settings.API_VERSION
2 changes: 2 additions & 0 deletions src/nrc/conf/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

API_VERSION = "2.0.0-alpha13"

DOCUMENTATION_INFO_MODULE = "nrc.api.schema"

REST_FRAMEWORK = BASE_REST_FRAMEWORK.copy()
REST_FRAMEWORK.update(
{"DEFAULT_PERMISSION_CLASSES": ("vng_api_common.permissions.AuthScopesRequired",)}
Expand Down
3 changes: 3 additions & 0 deletions src/nrc/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
"django_markup",
"django_better_admin_arrayfield",
"solo",
"simple_certmanager",
"zgw_consumers",
"notifications_api_common",
# Project applications.
"nrc.accounts",
"nrc.api",
Expand Down
Loading

0 comments on commit 96a761a

Please sign in to comment.