An open API service indexing awesome lists of open source software.

https://github.com/lyst/speccify

Tie together `drf-spectacular` and `djangorestframework-dataclasses` for easy-to-use apis and openapi schemas.
https://github.com/lyst/speccify

Last synced: about 1 year ago
JSON representation

Tie together `drf-spectacular` and `djangorestframework-dataclasses` for easy-to-use apis and openapi schemas.

Awesome Lists containing this project

README

          

# 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