Created
April 8, 2022 14:12
-
-
Save meoyawn/6a3b77f9144d6f0073a944efd9da7b84 to your computer and use it in GitHub Desktop.
generate TS client
This file contains hidden or 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
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