Open zupo opened 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.
request.openapi_validated
dataclass
Similar idea: https://github.com/graphql-python/graphene/issues/729#issuecomment-393673570
https://github.com/p1c2u/openapi-core/issues/88
It seems pyramid-swagger can generate python models on the fly: https://pyramid-swagger.readthedocs.io/en/latest/quickstart.html#accessing-request-data
Instead of having strings, ints, etc in
request.openapi_validated
we could havedataclass
objects that match the schema and provide type protection.