Skip to content

Commit

Permalink
Update openapi.json, add openapi.yaml and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jwokaty committed Aug 13, 2024
1 parent b88af78 commit 85dce46
Show file tree
Hide file tree
Showing 3 changed files with 1,652 additions and 1 deletion.
29 changes: 29 additions & 0 deletions inst/service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BEDbase uses OpenAPI 3.1; however, bedbaser uses the `AnVIL` `Service` class
that imports `rapiclient`, which is restricted to Swagger 2.0. openapi.yaml was
created by converting OpenAPI 3.0 with
[OpenAPI Down Convert](https://github.com/apiture/openapi-down-convert) then
converting the result to Swagger 2.0 with
[api-spec-converter](https://github.com/LucyBot-Inc/api-spec-converter) on a
machine running Ubuntu 24.04.

To recreate openapi.yaml, install `NodeJS` and `npm`.

sudo apt install nodejs npm

Install OpenAPI Down Convert and api-spec-converter with `npm`:

sudo npm install -g api-spec-converter
sudo npm install -g @apiture/openapi-down-convert

Download openapi.json from https://api.bedbase.org:

curl -L -O https://api.bedbase.org/openapi.json

Convert openapi.json from OpenAPI 3.1 to 3.0:

openapi-down-convert --input openapi.json --output openapi_3_0.json

Convert from OpenAPI 3.0 to Swagger 2.0 and render in YAML:

api-spec-converter -f openapi_3 -t swagger_2 openapi_3_0.json \
--syntax yaml > openapi.yaml
Loading

0 comments on commit 85dce46

Please sign in to comment.