Something still missing in all OpenAPI-first implementations I've seen for Python including openapi-core is type-safety w.r.t. the validated request body, URL parameters, and headers. openapi-core validates this data, but there currently is no way to statically type it except for manually implementing the type hints and manually typing the request handlers. This is brittle and doesn't scale well.
I suggest to generate code containing type hints and request handler interfaces for the supported web frameworks similar to oapi-codegen (Golang) or fastapi-code-generator (Python).
The details need to be discussed and figured out, of course, but I'd appreciate some feedback first. What do you think?
Something still missing in all OpenAPI-first implementations I've seen for Python including
openapi-coreis type-safety w.r.t. the validated request body, URL parameters, and headers.openapi-corevalidates this data, but there currently is no way to statically type it except for manually implementing the type hints and manually typing the request handlers. This is brittle and doesn't scale well.I suggest to generate code containing type hints and request handler interfaces for the supported web frameworks similar to
oapi-codegen(Golang) orfastapi-code-generator(Python).The details need to be discussed and figured out, of course, but I'd appreciate some feedback first. What do you think?