Tie together `drf-spectacular` and `djangorestframework-dataclasses` for easy-to-use apis and openapi schemas.
Project description
Speccify
Tie together drf-spectacular
and djangorestframework-dataclasses
for
easy-to-use apis and openapi schemas.
Usage
@dataclass
class MyQueryData():
name: str
@dataclass
class MyResponse:
length: int
@speccify.api_view(methods=["GET"], permissions=[])
def my_view(request: Request, my_query: Query[MyQueryData]) -> MyResponse:
name = my_query.name
length = len(name)
return MyResponse(length=length)
License
Apache2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
speccify-0.2.0.tar.gz
(9.2 kB
view hashes)
Built Distribution
speccify-0.2.0-py3-none-any.whl
(10.0 kB
view hashes)