Skip to content

Instantly share code, notes, and snippets.

@meoyawn
Created April 8, 2022 14:12
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 meoyawn/6a3b77f9144d6f0073a944efd9da7b84 to your computer and use it in GitHub Desktop.
Save meoyawn/6a3b77f9144d6f0073a944efd9da7b84 to your computer and use it in GitHub Desktop.
generate TS client
DIR:=gen/
openapi:
rm -rf $(DIR)
openapi-generator generate -g typescript-fetch -i http://localhost:8080/openapi.json -o $(DIR) --remove-operation-id-prefix --additional-properties=typescriptThreePlus=true,modelPropertyNaming=original,nullSafeAdditionalProps=true,enumPropertyNaming=original,supportsES6=true,useSingleRequestParameter=false
grep -rl "? undefined" $(DIR) | xargs sed -i '' 's/? undefined/? null/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment