-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update openapi.json, add openapi.yaml and documentation
- Loading branch information
Showing
3 changed files
with
1,652 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.