Open lefeverd opened 4 years ago
Hello everyone,
It seems that using the command connexion run with custom Resolvers doesn't work.
connexion run
Resolvers
Stubbing the specification should work even when using a custom Resolver, the same way it works without :
Resolver
connexion run examples/openapi3/helloworld/openapi/helloworld-api.yaml examples/openapi3/helloworld/ --stub -v
Currently, a 501 NOT IMPLEMENTED response is sent:
[dvd@dvd-fedora connexion]$ curl -v 'http://127.0.0.1:5000/v1.0/pets' * Trying 127.0.0.1:5000... * Connected to 127.0.0.1 (127.0.0.1) port 5000 (#0) > GET /v1.0/pets HTTP/1.1 > Host: 127.0.0.1:5000 > User-Agent: curl/7.69.1 > Accept: */* > * Mark bundle as not supporting multiuse * HTTP 1.0, assume close after body < HTTP/1.0 501 NOT IMPLEMENTED < Content-Type: application/problem+json < Content-Length: 110 < Server: Werkzeug/1.0.1 Python/3.8.5 < Date: Sun, 30 Aug 2020 08:42:27 GMT < { "detail": "Empty function name", "status": 501, "title": "Not Implemented", "type": "about:blank" } * Closing connection 0
Run the restyresolver example with connexion run :
connexion run examples/openapi3/restyresolver/resty-api.yaml examples/openapi3/restyresolver/ --stub -v
Try to execute a request :
[dvd@dvd-fedora connexion]$ curl -v 'http://127.0.0.1:5000/v1.0/pets'
Output of the commands:
python --version
pip show connexion | grep "^Version\:"
The CLI only uses your specification and view functions. The application is instantiated with the default resolver. If we would want to enable different resolvers, we would have to add this as an option to the CLI.
Hello everyone,
Description
It seems that using the command
connexion run
with customResolvers
doesn't work.Expected behaviour
Stubbing the specification should work even when using a custom
Resolver
, the same way it works without :Actual behaviour
Currently, a 501 NOT IMPLEMENTED response is sent:
Steps to reproduce
Run the restyresolver example with connexion run :
Try to execute a request :
Additional info:
Output of the commands:
python --version
Python 3.8.5pip show connexion | grep "^Version\:"
Version: 2.7.0