RobokopU24 / Feedback

Feedback on the ROBOKOP project
https://robokop.renci.org
0 stars 0 forks source link

Make API docs site generate dynamically based on API #182

Open Woozl opened 11 months ago

Woozl commented 11 months ago

The current API docs site (repo) requires a build step to populate with the most current data (minus the home page cards, which can be seen loading in by refreshing the page). The current build system we're using is Docusaurus, with this plugin to generate pages base on an openapi.yaml document. These essentially have a build step where all the data is collected, then you get a bunch static html/css/js pages representing your site.

It would simplify the deployment if every time the user loads the page, it fetches the most recent openapi spec and displays the ui based on that (of course this could be automatically cached if it's too slow).

The simplest solution would be to find another OpenAPI client that we like that doesn't involve a build step. If that isn't possible, we could write our own website to parse the OpenAPI spec (using a package like json-scheme-ref-parser). This is trickier, but doable, and would give us more flexibility in the design and organization of the content.

Woozl commented 10 months ago

Here's a new docs generator that looks interesting:

https://github.com/scalar/scalar

Demo site:

https://petstore.apidocumentation.com/

Woozl commented 10 months ago

Preview with Automat data:

https://robokopu24.github.io/robokop-scalar-api-docs/

cbizon commented 5 months ago

Is this still active?

hina-shah commented 2 days ago

I thought @Woozl worked on it, but it seems this is still not done.