gbif / tech-docs

This is an integrated technical documentation site for GBIF.org
https://techdocs.gbif.org
0 stars 2 forks source link

Generate SDKs from OpenAPI specs (e.g. Python and R) #35

Open MortenHofft opened 1 year ago

MortenHofft commented 1 year ago

Just an idea, but now that we are migrating our documentation to OpenAPI we also make it easier to integrate with other tools. Such as SDK generators.

I just tried https://openapi-generator.tech/ to generate a python SDK which seemed to work fine, but I didn't check for anything than the project could output something seemingly sensible. More: https://tools.openapis.org/categories/sdk.html

I also notice that there is an R sdk generator https://openapi-generator.tech/docs/generators/r

I do not know much about it, but if we think it is worth exploring, then it might also add some constraints, improvements to how we do our openAPI specs (merging the openAPI specs for registry and occurrences for example).

MattBlissett commented 1 year ago

Merging and/or pulling apart the OpenAPI specs has been done to avoid hundreds of methods on a single page, and to group concepts together regardless of which backend actually provides them. (e.g. registry-ws implements methods about downloads).

https://github.com/gbif/tech-docs/blob/main/fetch-openapi.py does this, and something similar could make an "everything" view.