some more documentation in the API and in the API code

This commit is contained in:
Laura Klünder 2023-11-19 00:12:10 +01:00
parent f96e916184
commit 0f43274e33
8 changed files with 126 additions and 24 deletions

View file

@ -2,11 +2,16 @@ from django.conf import settings
from ninja import Router as APIRouter
from ninja import Schema
from c3nav.api.utils import NonEmptyStr
auth_api_router = APIRouter(tags=["auth"])
class APITokenSchema(Schema):
token: str
"""
An API token to be used with Bearer authentication
"""
token: NonEmptyStr
@auth_api_router.get('/session/', response=APITokenSchema, auth=None,