Proposal for Refactoring: connexion/connexion/resolver.py::RestyResolver #1715
Replies: 2 comments 1 reply
-
Why does GitHub automatically upvote my post in my name? That's kind of weird. |
Beta Was this translation helpful? Give feedback.
-
I will close this discussion. I've decided upon ditching Connexion in favour of a custom WSGI application. Neither Flask, nor Werkzeug is required and the Connexion/Flask app initialisation is too heavy for my use-case, where i just need an URL router, and JSON schema validator based upon an OpenAPI spec. I wholeheartedly agree with a Specification-first approach, but (in my opinion) the way Flask is structured it counteracts to the lightweightness of WSGI. I mean this in regards to run-once process execution, and co-process execution, where a middleware, or adapter WSGI application should both be optimized for, since it can't anticipate what the terminal/target WSGI application is required to be optimized for (interpretation of PEP 333). With Flask however (which i consider a WSGI adapter), i only see optimizations for co-process execution. Optimizing Flask apps for Public Cloud functions (e.g. AWS Lambda, Azure Functions) is difficult, which is sad, because WSGI is a very nice CGI for said stuff. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Description
A suggestion for upgrading the coding style of connexion/connexion/resolver.py::RestyResolver, whilst maintaining the logic.
I haven't tested the code yet, but it should work on CPython >= 3.5. I would generally consider 3.5 the minimum version, since it's the version implementing PEP 484, which is the basis for proper, standardized type annotations in Python.
I used this as an exercise for understanding the operation of the
RestyResolver
. I will implement a custom resolver for an application.I'll create a pull request once i've implemented my custom resolver, since i will get to run the
RestyResolver
code by then.Additional info:
Beta Was this translation helpful? Give feedback.
All reactions