Pylons / pyramid_openapi3

Pyramid addon for OpenAPI3 validation of requests and responses.
https://pypi.org/project/pyramid-openapi3/
MIT License
82 stars 46 forks source link

Return @dataclasses objects instead of primitives in request.openapi_validated #3

Open zupo opened 6 years ago

zupo commented 6 years ago

Instead of having strings, ints, etc in request.openapi_validated we could have dataclass objects that match the schema and provide type protection.

zupo commented 6 years ago

Similar idea: https://github.com/graphql-python/graphene/issues/729#issuecomment-393673570

domenkozar commented 6 years ago

https://github.com/p1c2u/openapi-core/issues/88

zupo commented 5 years ago

It seems pyramid-swagger can generate python models on the fly: https://pyramid-swagger.readthedocs.io/en/latest/quickstart.html#accessing-request-data