spec-first / connexion

Connexion is a modern Python web framework that makes spec-first and api-first development easy.
https://connexion.readthedocs.io/en/latest/
Apache License 2.0
4.47k stars 760 forks source link

Remove Swagger UI vendor code #406

Closed rafaelcaricio closed 5 years ago

rafaelcaricio commented 7 years ago

Today Connexion hosts a vendor of Swagger UI code. This is a highly unmaintainable code which is even customized for Connexion needs. We have to review this approach.

We need to find an alternative way to have the support to Swagger UI in Connexion projects which must not need to have the whole vendor code inside Connexion.

rafaelcaricio commented 7 years ago

Currently we have a script called update.sh that applies a small patch to the original Swagger UI code.

We should think if it would be possible to use the Swagger UI code without modifications and completely remove the Swagger UI code from the Connexion repo.

An possible solution would be to create an external Python package that bundles the Swagger UI. That Swagger UI package would be optionally installed by users of Connexion if they want to use it.

jmcs commented 7 years ago

An possible solution would be to create an external Python package that bundles the Swagger UI. That Swagger UI package would be optionally installed by users of Connexion if they want to use it.

We can evaluate:

rafaelcaricio commented 7 years ago

Opened an issue in the first project: https://github.com/sveint/flask-swagger-ui/issues/2

bobh66 commented 7 years ago

The flask-restplus package includes a nice swagger-ui implementation. Would it make sense to use that if the package is installed?

enezhadian commented 7 years ago

@rafaelcaricio An alternative approach could be requiring users to provide the code for Swagger UI while configuring the Connexion app. I don't think simply simply bundling Swagger UI in an external package will solve the issue of maintainability.

rafaelcaricio commented 7 years ago

@enezhadian I agree, users should provide the path for the Swagger UI code (if they want to use it). And we should remove the Swagger UI code completely from Connexion codebase.

The external package idea is a call for anyone that wants to create it and maintain. So we (Connexion) can recommend to users to install that package and not rely on Connexion to provide the Swagger UI.

beardedeagle commented 7 years ago

@rafaelcaricio I have developed a flask extension that does most if not all of what you are asking for. I am currently in the process of getting it open sourced through my company (it is MIT licensed), but once it is available, I would be more than happy to have your team use it:

What it does:

- Serve your Swagger specification (json or yaml).
- Serve the Swagger ui (versions 2, 3 or you can provide your own swagger ui dist package).
- Introduce as few dependencies as possible (currently just Flask, PyYaml and typing).

What it doesn't do:

- Validate your specification.
- Validate requests or responses.
- Serialization of requests or responses.
- Impose specific error handling/formatting upon you.
- Impose specific marshaling libraries upon you.
- Handle OAuth 2 token-based authentication on your behalf.

I was actually using flask-restplus and connexion before I went ahead and wrote this, so if it sounds like it was influenced by you guys, it was.

as an added bonus, it's pretty much fully customizable.

chimeno commented 6 years ago

Hi @beardedeagle , ¿Whats the status of that project? I would like to upgrade to v3.x.x but since connexion wants to avoid vendor code, an extra package seems useful.

beardedeagle commented 6 years ago

Yes, sorry I have been swamped with work like you would not believe. I am fast tracking this through our Open Source path as we speak.

cetanu commented 6 years ago

It's already possible to specify a directory where the Swagger UI resides

SWAGGER_PATH = '/home/myuser/swagger-ui'

app = connexion.FlaskApp(__name__, specification_dir='swagger/')
app.add_api('my_api.yaml', swagger_path=SWAGGER_PATH)

This is undocumented and is passed into the options attribute of the FlaskApp class via dictionary extension of a kwargs dictionary called old_style_options

dtkav commented 6 years ago

@enezhadian I agree, users should provide the path for the Swagger UI code (if they want to use it).

I really appreciate having swagger-ui as "batteries included". I get the sentiment to not be responsible for that component, integration testing, etc, but it provides a much better product when it just works out of the box.

Since the refactor to support aiohttp, a flask-only plugin (@beardedeagle's package) probably isn't the right solution to support both flask and aiohttp.

What about creating a package with the static files for stable versions 2 and 3, and then leveraging extra_require so it could be installed like this?:

pip install connexion[swagger-ui]

by default, pip install connexion could not include those dependencies. It probably also makes sense to promote swagger_path from the old_style_options to the new style options and document it.

It looks like the modifications for connexion are to template the default spec url from /swagger.json to /<base_url>/swagger.json (openapi.json for oas3) and to remove spec validation.

I could publish a package to PyPI with the swagger-ui static files if folks are onboard with the ideas above.

Let me know what you think!

cetanu commented 6 years ago

+1 for adding swagger_path to the current set of options, out from the old options -1 for a separate python package that contains (the latest version?) of swagger ui as an extra req

Just because... it (the package) requires maintaining. The current (old) swagger ui is still usable, but users can choose to bundle their own (which I have done, to get the latest UI)

But i'm not a core dev so my 2 cents weighs less

dtkav commented 6 years ago

@cetanu FWIW I'm also happy with how swagger-ui is currently vendored (and overridable), but my read of this thread makes me think that other folks are not. For my OpenAPI3 work (#420) I've followed the vendoring pattern, but it certainly adds a whole lot more files!

I put together a package that bundles the static files and is webserver agnostic here: https://github.com/dtkav/swagger_ui_bundle just to flesh out what a packaged solution might look like.

Your feedback is welcome :slightly_smiling_face:

dtkav commented 5 years ago

This is now complete with the release of Connexion 2.0!

cetanu commented 5 years ago

Just updated to 2.0, added the swagger_ui_bundle... works fine 👍

dtkav commented 5 years ago

I should also note that this ticket was implemented as an optional dependency using pip extras. It can be installed like this:

pip install connexion[swagger-ui]
osma commented 5 years ago

I hit this problem too and had to add not only connexion[swagger-ui] as a dependency but also swagger_ui_bundle. Is this intended? Should adding a dependency for swagger_ui_bundle be mentioned in the release notes?

dtkav commented 5 years ago

Hey Osma,

What version of pip are you using? all connexion[swagger-ui] does is also installs swagger-ui-bundle. I've seen different versions of pip have trouble with special characters like hyphens before though.

On Wed, Nov 21, 2018, 9:07 PM Osma Suominen notifications@github.com wrote:

I hit this problem too and had to add not only connexion[swagger-ui] as a dependency but also swagger_ui_bundle. Is this intended? Should adding a dependency for swagger_ui_bundle be mentioned in the release notes?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/zalando/connexion/issues/406#issuecomment-440607222, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlPSZfClCzBGcxt3xMB06ncd4B3J56Cks5uxSXogaJpZM4MER3j .

osma commented 5 years ago

@dtkav Thanks for the quick response! I'm currently trying to package my application Annif into PyPI. First I'm releasing test builds on TestPyPI. While doing that, I noticed the problem with Connexion 2.0 not including swagger-ui by default. So first I added connexion[swagger-ui] as a dependency in annif 0.36.3 (see diff). It didn't help though.

Here is the full sequence of commands I used to install my package with all dependencies in a fresh virtual environment (created using the venv module from Python 3.5.2, on Ubuntu 16.04) . I started by upgrading pip to the newest version (18.1).

oisuomin@dx2-lib-2:~/tmp/annif-pypi$ rm -rf venv/
oisuomin@dx2-lib-2:~/tmp/annif-pypi$ python3 -m venv venv
oisuomin@dx2-lib-2:~/tmp/annif-pypi$ . venv/bin/activate
(venv) oisuomin@dx2-lib-2:~/tmp/annif-pypi$ pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Uninstalling pip-8.1.1:
      Successfully uninstalled pip-8.1.1
Successfully installed pip-18.1
(venv) oisuomin@dx2-lib-2:~/tmp/annif-pypi$ pip install --extra-index-url https://test.pypi.org/simple/ annif==0.36.3
Looking in indexes: https://pypi.org/simple, https://test.pypi.org/simple/
Collecting annif==0.36.3
  Using cached https://test-files.pythonhosted.org/packages/e5/21/b633441a90e63f3fb8358835be9244bb12e2f722738417cf55ba30b57e72/annif-0.36.3-py3-none-any.whl
Collecting fasttextmirror (from annif==0.36.3)
Collecting flask-cors (from annif==0.36.3)
  Using cached https://files.pythonhosted.org/packages/65/cb/683f71ff8daa3aea0a5cbb276074de39f9ab66d3fbb8ad5efb5bb83e90d2/Flask_Cors-3.0.7-py2.py3-none-any.whl
Collecting sklearn (from annif==0.36.3)
Collecting connexion[swagger_ui] (from annif==0.36.3)
  Using cached https://files.pythonhosted.org/packages/78/46/7a53cd1771e098d7d6b707a5667d93c8ce6028fe0a4544739eebe9b91303/connexion-2.0.2-py2.py3-none-any.whl
  connexion 2.0.2 does not provide the extra 'swagger_ui'
[...some output skipped...]
Installing collected packages: pybind11, numpy, fasttextmirror, Six, Werkzeug, MarkupSafe, Jinja2, click, itsdangerous, Flask, flask-cors, scipy, scikit-learn, sklearn, typing, jsonschema, urllib3, certifi, chardet, idna, requests, PyYAML, openapi-spec-validator, inflection, clickclick, connexion, jmespath, docutils, python-dateutil, botocore, s3transfer, boto3, boto, bz2file, smart-open, gensim, singledispatch, nltk, pyparsing, isodate, rdflib, click-log, annif
Successfully installed Flask-1.0.2 Jinja2-2.10 MarkupSafe-1.1.0 PyYAML-3.13 Six-1.11.0 Werkzeug-0.14.1 annif-0.36.3 boto-2.49.0 boto3-1.9.49 botocore-1.12.49 bz2file-0.98 certifi-2018.10.15 chardet-3.0.4 click-7.0 click-log-0.3.2 clickclick-1.2.2 connexion-2.0.2 docutils-0.14 fasttextmirror-0.8.22 flask-cors-3.0.7 gensim-3.6.0 idna-2.7 inflection-0.3.1 isodate-0.6.0 itsdangerous-1.1.0 jmespath-0.9.3 jsonschema-2.6.0 nltk-3.4 numpy-1.15.4 openapi-spec-validator-0.2.4 pybind11-2.2.4 pyparsing-2.3.0 python-dateutil-2.7.5 rdflib-4.2.2 requests-2.20.1 s3transfer-0.1.13 scikit-learn-0.20.0 scipy-1.1.0 singledispatch-3.4.0.3 sklearn-0.0 smart-open-1.7.1 typing-3.6.6 urllib3-1.24.1

Note that swagger-ui-bundle is not among the installed packages.

In annif 0.36.4 I also added swagger_ui_bundle as a dependency (see diff). This time it seems to have worked:

oisuomin@dx2-lib-2:~/tmp/annif-pypi$ rm -rf venv
oisuomin@dx2-lib-2:~/tmp/annif-pypi$ python3 -m venv venv
oisuomin@dx2-lib-2:~/tmp/annif-pypi$ . venv/bin/activate
(venv) oisuomin@dx2-lib-2:~/tmp/annif-pypi$ pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Uninstalling pip-8.1.1:
      Successfully uninstalled pip-8.1.1
Successfully installed pip-18.1
(venv) oisuomin@dx2-lib-2:~/tmp/annif-pypi$ pip install --extra-index-url https://test.pypi.org/simple/ annif==0.36.4
Looking in indexes: https://pypi.org/simple, https://test.pypi.org/simple/
Collecting annif==0.36.4
  Using cached https://test-files.pythonhosted.org/packages/fd/59/b9cdf6cc074bad1541d908459ef006a6e33bd1ad683ada8d232cd403c9dd/annif-0.36.4-py3-none-any.whl
Collecting swagger-ui-bundle (from annif==0.36.4)
  Using cached https://files.pythonhosted.org/packages/25/b8/df9bf0a8ed761a481e993665e3e820f69ce5043cd270c67a9fcfddafbffe/swagger_ui_bundle-0.0.2-py3-none-any.whl
Collecting fasttextmirror (from annif==0.36.4)
Collecting sklearn (from annif==0.36.4)
Collecting gensim (from annif==0.36.4)
  Using cached https://files.pythonhosted.org/packages/03/0a/02c7ac51565a0a5b05a07936e5559a635d5d2e8cf19801e0f00204df5ece/gensim-3.6.0-cp35-cp35m-manylinux1_x86_64.whl
Collecting flask-cors (from annif==0.36.4)
  Using cached https://files.pythonhosted.org/packages/65/cb/683f71ff8daa3aea0a5cbb276074de39f9ab66d3fbb8ad5efb5bb83e90d2/Flask_Cors-3.0.7-py2.py3-none-any.whl
Collecting rdflib (from annif==0.36.4)
  Using cached https://files.pythonhosted.org/packages/3c/fe/630bacb652680f6d481b9febbb3e2c3869194a1a5fc3401a4a41195a2f8f/rdflib-4.2.2-py3-none-any.whl
Collecting click-log (from annif==0.36.4)
  Using cached https://files.pythonhosted.org/packages/38/52/a9dbb622f40ceeb09df141d855062cc9fbb38011f0ad8caee0cd840f399c/click_log-0.3.2-py2.py3-none-any.whl
Collecting nltk (from annif==0.36.4)
Collecting connexion[swagger_ui] (from annif==0.36.4)
  Using cached https://files.pythonhosted.org/packages/78/46/7a53cd1771e098d7d6b707a5667d93c8ce6028fe0a4544739eebe9b91303/connexion-2.0.2-py2.py3-none-any.whl
  connexion 2.0.2 does not provide the extra 'swagger_ui'
[...some output skipped...]
Successfully installed Flask-1.0.2 Jinja2-2.10 MarkupSafe-1.1.0 PyYAML-3.13 Werkzeug-0.14.1 annif-0.36.4 boto-2.49.0 boto3-1.9.49 botocore-1.12.49 bz2file-0.98 certifi-2018.10.15 chardet-3.0.4 click-7.0 click-log-0.3.2 clickclick-1.2.2 connexion-2.0.2 docutils-0.14 fasttextmirror-0.8.22 flask-cors-3.0.7 gensim-3.6.0 idna-2.7 inflection-0.3.1 isodate-0.6.0 itsdangerous-1.1.0 jmespath-0.9.3 jsonschema-2.6.0 nltk-3.4 numpy-1.15.4 openapi-spec-validator-0.2.4 pybind11-2.2.4 pyparsing-2.3.0 python-dateutil-2.7.5 rdflib-4.2.2 requests-2.20.1 s3transfer-0.1.13 scikit-learn-0.20.0 scipy-1.1.0 singledispatch-3.4.0.3 six-1.11.0 sklearn-0.0 smart-open-1.7.1 swagger-ui-bundle-0.0.2 typing-3.6.6 urllib3-1.24.1

In this case swagger-ui-bundle is actually installed - of course, since I now have an explicit dependency on it. I can live with this, but it doesn't seem right.

In both cases I see this suspicious line in pip output:

connexion 2.0.2 does not provide the extra 'swagger_ui'

Note that I've specified the dependencies like this in setup.py:

install_requires=[
    'connexion[swagger-ui]',

I don't know why or where my swagger-ui (with a dash) turned into swagger_ui (with an underscore).

dtkav commented 5 years ago

yeah, just as I feared. looks like pip is the culprit. its late for me right now, but I'll try to take a look tomorrow or the next day. I think we'll just need to add another pip extra to the package with an underscore :/.

On Wed, Nov 21, 2018, 10:39 PM Osma Suominen notifications@github.com wrote:

@dtkav https://github.com/dtkav Thanks for the quick response! I'm currently trying to package my application Annif into PyPI. First I'm releasing test builds on TestPyPI https://test.pypi.org/project/annif/. While doing that, I noticed the problem with Connexion 2.0 not including swagger-ui by default. So first I added connexion[swagger-ui] as a dependency in annif 0.36.3 (see diff https://github.com/NatLibFi/Annif/pull/214/files). It didn't help though.

Here is the full sequence of commands I used to install my package with all dependencies in a fresh virtual environment (created using the venv module from Python 3.5.2, on Ubuntu 16.04) . I started by upgrading pip to the newest version (18.1).

oisuomin@dx2-lib-2:~/tmp/annif-pypi$ rm -rf venv/ oisuomin@dx2-lib-2:~/tmp/annif-pypi$ python3 -m venv venv oisuomin@dx2-lib-2:~/tmp/annif-pypi$ . venv/bin/activate (venv) oisuomin@dx2-lib-2:~/tmp/annif-pypi$ pip install --upgrade pip Collecting pip Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 8.1.1 Uninstalling pip-8.1.1: Successfully uninstalled pip-8.1.1 Successfully installed pip-18.1 (venv) oisuomin@dx2-lib-2:~/tmp/annif-pypi$ pip install --extra-index-url https://test.pypi.org/simple/ annif==0.36.3 Looking in indexes: https://pypi.org/simple, https://test.pypi.org/simple/ Collecting annif==0.36.3 Using cached https://test-files.pythonhosted.org/packages/e5/21/b633441a90e63f3fb8358835be9244bb12e2f722738417cf55ba30b57e72/annif-0.36.3-py3-none-any.whl Collecting fasttextmirror (from annif==0.36.3) Collecting flask-cors (from annif==0.36.3) Using cached https://files.pythonhosted.org/packages/65/cb/683f71ff8daa3aea0a5cbb276074de39f9ab66d3fbb8ad5efb5bb83e90d2/Flask_Cors-3.0.7-py2.py3-none-any.whl Collecting sklearn (from annif==0.36.3) Collecting connexion[swagger_ui] (from annif==0.36.3) Using cached https://files.pythonhosted.org/packages/78/46/7a53cd1771e098d7d6b707a5667d93c8ce6028fe0a4544739eebe9b91303/connexion-2.0.2-py2.py3-none-any.whl connexion 2.0.2 does not provide the extra 'swagger_ui' [...some output skipped...] Installing collected packages: pybind11, numpy, fasttextmirror, Six, Werkzeug, MarkupSafe, Jinja2, click, itsdangerous, Flask, flask-cors, scipy, scikit-learn, sklearn, typing, jsonschema, urllib3, certifi, chardet, idna, requests, PyYAML, openapi-spec-validator, inflection, clickclick, connexion, jmespath, docutils, python-dateutil, botocore, s3transfer, boto3, boto, bz2file, smart-open, gensim, singledispatch, nltk, pyparsing, isodate, rdflib, click-log, annif Successfully installed Flask-1.0.2 Jinja2-2.10 MarkupSafe-1.1.0 PyYAML-3.13 Six-1.11.0 Werkzeug-0.14.1 annif-0.36.3 boto-2.49.0 boto3-1.9.49 botocore-1.12.49 bz2file-0.98 certifi-2018.10.15 chardet-3.0.4 click-7.0 click-log-0.3.2 clickclick-1.2.2 connexion-2.0.2 docutils-0.14 fasttextmirror-0.8.22 flask-cors-3.0.7 gensim-3.6.0 idna-2.7 inflection-0.3.1 isodate-0.6.0 itsdangerous-1.1.0 jmespath-0.9.3 jsonschema-2.6.0 nltk-3.4 numpy-1.15.4 openapi-spec-validator-0.2.4 pybind11-2.2.4 pyparsing-2.3.0 python-dateutil-2.7.5 rdflib-4.2.2 requests-2.20.1 s3transfer-0.1.13 scikit-learn-0.20.0 scipy-1.1.0 singledispatch-3.4.0.3 sklearn-0.0 smart-open-1.7.1 typing-3.6.6 urllib3-1.24.1

Note that swagger-ui-bundle is not among the installed packages.

In annif 0.36.4 I also added swagger_ui_bundle as a dependency (see diff https://github.com/NatLibFi/Annif/pull/215/files). This time it seems to have worked:

oisuomin@dx2-lib-2:~/tmp/annif-pypi$ rm -rf venv oisuomin@dx2-lib-2:~/tmp/annif-pypi$ python3 -m venv venv oisuomin@dx2-lib-2:~/tmp/annif-pypi$ . venv/bin/activate (venv) oisuomin@dx2-lib-2:~/tmp/annif-pypi$ pip install --upgrade pip Collecting pip Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 8.1.1 Uninstalling pip-8.1.1: Successfully uninstalled pip-8.1.1 Successfully installed pip-18.1 (venv) oisuomin@dx2-lib-2:~/tmp/annif-pypi$ pip install --extra-index-url https://test.pypi.org/simple/ annif==0.36.4 Looking in indexes: https://pypi.org/simple, https://test.pypi.org/simple/ Collecting annif==0.36.4 Using cached https://test-files.pythonhosted.org/packages/fd/59/b9cdf6cc074bad1541d908459ef006a6e33bd1ad683ada8d232cd403c9dd/annif-0.36.4-py3-none-any.whl Collecting swagger-ui-bundle (from annif==0.36.4) Using cached https://files.pythonhosted.org/packages/25/b8/df9bf0a8ed761a481e993665e3e820f69ce5043cd270c67a9fcfddafbffe/swagger_ui_bundle-0.0.2-py3-none-any.whl Collecting fasttextmirror (from annif==0.36.4) Collecting sklearn (from annif==0.36.4) Collecting gensim (from annif==0.36.4) Using cached https://files.pythonhosted.org/packages/03/0a/02c7ac51565a0a5b05a07936e5559a635d5d2e8cf19801e0f00204df5ece/gensim-3.6.0-cp35-cp35m-manylinux1_x86_64.whl Collecting flask-cors (from annif==0.36.4) Using cached https://files.pythonhosted.org/packages/65/cb/683f71ff8daa3aea0a5cbb276074de39f9ab66d3fbb8ad5efb5bb83e90d2/Flask_Cors-3.0.7-py2.py3-none-any.whl Collecting rdflib (from annif==0.36.4) Using cached https://files.pythonhosted.org/packages/3c/fe/630bacb652680f6d481b9febbb3e2c3869194a1a5fc3401a4a41195a2f8f/rdflib-4.2.2-py3-none-any.whl Collecting click-log (from annif==0.36.4) Using cached https://files.pythonhosted.org/packages/38/52/a9dbb622f40ceeb09df141d855062cc9fbb38011f0ad8caee0cd840f399c/click_log-0.3.2-py2.py3-none-any.whl Collecting nltk (from annif==0.36.4) Collecting connexion[swagger_ui] (from annif==0.36.4) Using cached https://files.pythonhosted.org/packages/78/46/7a53cd1771e098d7d6b707a5667d93c8ce6028fe0a4544739eebe9b91303/connexion-2.0.2-py2.py3-none-any.whl connexion 2.0.2 does not provide the extra 'swagger_ui' [...some output skipped...] Successfully installed Flask-1.0.2 Jinja2-2.10 MarkupSafe-1.1.0 PyYAML-3.13 Werkzeug-0.14.1 annif-0.36.4 boto-2.49.0 boto3-1.9.49 botocore-1.12.49 bz2file-0.98 certifi-2018.10.15 chardet-3.0.4 click-7.0 click-log-0.3.2 clickclick-1.2.2 connexion-2.0.2 docutils-0.14 fasttextmirror-0.8.22 flask-cors-3.0.7 gensim-3.6.0 idna-2.7 inflection-0.3.1 isodate-0.6.0 itsdangerous-1.1.0 jmespath-0.9.3 jsonschema-2.6.0 nltk-3.4 numpy-1.15.4 openapi-spec-validator-0.2.4 pybind11-2.2.4 pyparsing-2.3.0 python-dateutil-2.7.5 rdflib-4.2.2 requests-2.20.1 s3transfer-0.1.13 scikit-learn-0.20.0 scipy-1.1.0 singledispatch-3.4.0.3 six-1.11.0 sklearn-0.0 smart-open-1.7.1 swagger-ui-bundle-0.0.2 typing-3.6.6 urllib3-1.24.1

In this case swagger-ui-bundle is actually installed - of course, since I now have an explicit dependency on it. I can live with this, but it doesn't seem right.

In both cases I see this suspicious line in pip output:

connexion 2.0.2 does not provide the extra 'swagger_ui'

Note that I've specified the dependencies like this in setup.py:

install_requires=[ 'connexion[swagger-ui]',

I don't know why or where my swagger-ui (with a dash) turned into swagger_ui (with an underscore).

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/zalando/connexion/issues/406#issuecomment-440633705, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlPSZFSn6LUsasJtDXVMtSgCpZM1Efaks5uxTtUgaJpZM4MER3j .

osma commented 5 years ago

Thanks @dtkav for looking into this, no hurry from my side!

osma commented 5 years ago

Here's another similar report, though in that case the pip error message shows swagger-ui with a dash, not an underscore.