-
Notifications
You must be signed in to change notification settings - Fork 39
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
add providers to openapi.json #303
Conversation
The OpenAPI 3 specification allows the addition of a list of servers to the openapi.json file: https://swagger.io/docs/specification/api-host-and-base-path/ This is can be used to get a fully interactive swagger documentation, which also allows users to make requests.
Codecov Report
@@ Coverage Diff @@
## master #303 +/- ##
==========================================
- Coverage 90.03% 89.88% -0.16%
==========================================
Files 54 54
Lines 2268 2273 +5
==========================================
+ Hits 2042 2043 +1
- Misses 226 230 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Will this fix and close #193? |
You should add https://optimade.odbx.science as well I think, this is @ml-evs's implementation based on this repo. |
It sounds like "test databases" are going to be useful for the final NaCl paper query, would it make sense to link to that one here? I'm guessing I'll host it at https://optimade-test.odbx.science if you want to put that link up. |
Definitely. Please also have a look at the PR when you find time; if possible, I'd like to make all changes in one go. Cheers! |
Hi @ltalirz, this was a nice idea that we've forgotten about! I just have two concerns now:
|
Maybe host it somewhere else and include it via |
Just to understand: these schemas are copied over / replicated to the specification repo? It's certainly possible to create another copy of the openapi spec for the swagger UI - it's just that then there are two openapi specs in the repo instead of just one. In terms of fetching the list of servers - is there now a list hosted elsewhere that one could use to fetch those programmatically? |
openapi/openapi.json
Outdated
"description": "Heroku instance tracking 'master' branch of optimade-python-tools" | ||
}, | ||
{ | ||
"url": "https://dev-aiida-dev.materialscloud.org/optimade-sample/optimade", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this url: "https://dev-aiida-dev.materialscloud.org/optimade-sample/optimade" is correct?
I could not connect to it.
See also cors_providers.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I just saw this
I certainly cannot remember ever doing that (sorry if I did this "in my dreams" ;-) )... I still think the idea in this PR makes sense but I currently don't have time to work on it.
The updated URL would be https://aiida.materialscloud.org/optimade-sample/optimade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for providing the correct link.
In May, I started a Postdoc at Cecam and I will be working on the Optimade project. Therefore, Matthew made me code owner for part of the code. Perhaps this triggered the review request. As I am still quite new to the project, I think it would be better to let Matthew and Casper decide about what to do with this pull request.
Updated url for aiida
Updated url for aiida
I think this PR is now pretty stale, please feel free to reopen if someone still wants this in. |
fixes #193
The OpenAPI 3 specification allows the addition of a list of servers to
the openapi.json file:
https://swagger.io/docs/specification/api-host-and-base-path/
This is can be used to get a fully interactive swagger documentation,
which also allows users to make requests.
Try it live
(and, in particular, use it to try out queries)
The idea is to replace the "API Documentation" link on http://www.optimade.org/ by this
So far, this PR contains just the basics to make it work. Happy to improve configurability / think about default behavior etc.