playpauseandstop / rororo

Implement aiohttp.web OpenAPI 3 server applications with schema first approach.

Home Page:https://rororo.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate whether it is possible to validate error responses

playpauseandstop opened this issue · comments

Right now rororo is able to validate response if view handler has not raised an exception.

Need to investigate whether it is possible to validate error responses. Maybe it is possible after #22 by providing validate response middleware before error middleware, but after CORS middleware.

Yes, it is possible to validate even error responses, to achieve that need to get rid of openapi_operation decorator in favor of,

  • openapi_middleware to ensure that request is valid
  • openapi_middleware to be inherited from error_middleware (if enabled) and to check whether response is valid (if enabled), even response is a exception