Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Integralist
Created February 9, 2021 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Integralist/28ea658092a78306071c46aebd56c607 to your computer and use it in GitHub Desktop.
Save Integralist/28ea658092a78306071c46aebd56c607 to your computer and use it in GitHub Desktop.
[OpenAPI Generator] #openapi #api #generator
#!/usr/bin/env bash
languages=("bash" "go" "javascript" "php" "python" "ruby" "rust" "typescript-fetch")
for lang in "${languages[@]}";
do
for filename in .source-cache/.api-documentation/schemas/*;
do
name=$(basename $filename | cut -f 1 -d '.')
openapi-generator generate --skip-validate-spec -i "${filename}" -g "${lang}" -o "/tmp/api-code-gen/${lang}/${name}/"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment