-
-
Notifications
You must be signed in to change notification settings - Fork 767
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
Naive switch from Flask to AIOHTTP fails #578
Comments
/cc @dutradda |
@hjacobs The solution was add these parts on docs: So it is not a bug because the way how aiohttp handler works is different from the flask handler. I can do an improve to support the same handler returns types as flask. But again, it is not a bug. About the only_ony_api argument we can put in the docs improves too. |
@hjacobs @dutradda we should probably make a separate section with the few short examples, I feel that ppl will expect it to be transparent, so we need to disillusion it with clear examples / hello world aiohttp connexion app. |
@prawn-cake Other approach is to implement these types of return types directly on the abstract class, so connexion will support natively. |
@prawn-cake @dutradda please contribute an example app, e.g. into the |
@dutradda not sure if I got what you mean. If the problem now that it's not intuitive to add those handlers right then I'd address it to the documentation which should be done anyway. |
Documented in AbstractApi._response_from_handler. This method is implemented by subclasses. Body and tuples are validated by connexion.operations.validation.validate_operation_output fixes spec-first#578
unifying response handling (ie accepting tuples) between Flask and AioHttp is implemented in #849. |
aiohttp has been dropped and switch between Flask and AsyncApp is now straightforward. |
I'm trying my example project (https://github.com/hjacobs/connexion-example) to switch to AIOHTTP, but it fails.
only_one_api=True
to the constructor inapp.py
(this probably deserves a documentation entry)The text was updated successfully, but these errors were encountered: