Comments (5)
Issue with Connexion default behavior. Multiple issues have been created but the default behavior is to override servers
whatever the situation, and Connexion do not seems to provide ways to make sure the servers
defined by the user in the openapi.yml
file
spec-first/connexion#1174
spec-first/connexion#1139
spec-first/connexion#1047
The culprit: https://github.com/zalando/connexion/blob/master/connexion/apis/flask_api.py#L310
It can be solved by adding a param to disable _spec_for_prefix
An options
like self.options.openapi_spec_path
self.options.disable_servers_overwrite = True
Then check it in _spec_for_prefix
from translator-openpredict.
Using https://pypi.org/project/flask-reverse-proxy-fix/ can help solve the issue
requirements.txt:
flask-reverse-proxy-fix
werkzeug<1
Code:
from flask_reverse_proxy_fix.middleware import ReverseProxyPrefixFix
api = connexion.App(__name__, options={"swagger_url": ""}, arguments={'server_url': server_url})
api.add_api('openapi.yml')
api.app.config['REVERSE_PROXY_PATH'] = 'http://api.collaboratory.semantiscience.org'
ReverseProxyPrefixFix(api.app)
api.run(host='0.0.0.0', port=port, debug=debug, server=deployment_server)
from translator-openpredict.
Great! but the server url is misspelled .
from translator-openpredict.
Yep it works with absolute URIs and relative paths(e.g. /api
or v1
)
Going to try it with Smart API
from translator-openpredict.
Smart API still not working even with absolute URL: https://smart-api.info/ui/ff8e602615d19577fa3759240dcce951
from translator-openpredict.
Related Issues (20)
- Use OpenML to save models?
- Add users
- Issue with Spark HOT 1
- Allow to provide scores interval HOT 1
- Integrate to BioThings Explorer
- Accept embeddings as CSV and JSON
- Add new way to compute embeddings
- Wikidata embeddings
- Covid embeddings
- Use up to date pyrdf2vec to generate embeddings?
- ZAP Scan Baseline Report - https://openpredict.semanticscience.org/
- Invalid TRAPI HOT 1
- type->attribute_type_id HOT 1
- OpenPredict responding to a query expecting biolink:Genes HOT 2
- Deploy 1.3 HOT 4
- disease treats disease being returned on TRAPI query HOT 4
- SmartAPI registration is missing the x-trapi info HOT 2
- Inconsistent Docker build on different machines HOT 2
- Empty tags are displayed by Swagger UI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from translator-openpredict.