saferwall / saferwall-ui

🚀 The UI FrontEnd behind saferwall.com
https://saferwall.com
Apache License 2.0
2 stars 3 forks source link

Use `openapi-generator-cli` to generate typescript API files #33

Open sickl8 opened 4 months ago

sickl8 commented 4 months ago

Add openapi-generator-cli from npm to the CI pipeline. Requires java (for the base tool) and node+npm (for the openapi-generator-cli). Command to generate the API typescript files:

# can use yaml
npx openapi-generator-cli generate -i ${GO_WEBAPI_FOLDER}/docs/swagger.yaml -g typescript-axios -o src/lib/api
# or json
npx openapi-generator-cli generate -i ${GO_WEBAPI_FOLDER}/docs/swagger.json -g typescript-axios -o src/lib/api