-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requests not validated with the "foreign specification" strategy #16
Comments
And browse /apidoc/?spec=myspec
|
So, the explicit call to the Good to know. |
Automatically bind the handler through the operationId of the library knows how, you just need to define the mapping in which handlers can be found. See #2 |
Yes, I am aware of that option, thanks. It is usable, but perhaps an automated mapping without the need for the |
According to the documentation:
http://aiohttp-apiset.readthedocs.io/en/latest/
the library is supposed to work with a "foreign specification" strategy where the entire OpenAPI specification is read from an external file. So, when I initialize the
SwaggerRouter
like this:I would suppose that the library should:
apidoc/
URL, andHowever, the library only performs the first point (i.e. makes the web-based documentation available). It does not validate requests or responses according to the provided OpenAPI specification. The relevant part of the code:
aiohttp_apiset/aiohttp_apiset/swagger/route.py
Line 223 in b6d6fa0
is only able to utilize the OpenAPI specification for requests' validation and only when it is present in the request handler's docstring.
I believe that for this library to be useful with the "foreign specification" strategy, it needs to be able to validate the requests and responses using the OpenAPI specification which comes from an external file.
Moreover, it seems like the foreign specification strategy of this library is poorly documented, because the details of the actual behavior are left out and they need to be looked up manually from the code.
The text was updated successfully, but these errors were encountered: