github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/Makefile (about) 1 run: 2 make lint 3 make bundle 4 make ruby 5 make go 6 make typescript 7 make python 8 make java 9 make php 10 make cli 11 @echo Client libraries generated, check clients directory. 12 lint: 13 npx swagger-cli validate main.yaml 14 make bundle 15 bash ./lint.sh 16 bundle: 17 npx swagger-cli bundle -t json -w 300 main.yaml > doc/compiled.json 18 npx swagger-cli bundle -t yaml -w 300 main.yaml > tmp/compiled.yaml 19 watch_bundle: 20 make lint 21 npx swagger-cli bundle -t json -w 300 main.yaml > doc/compiled.json 22 watch_scss: 23 npx sass --watch ./doc/main.scss:./doc/main.css ./doc/rapidoc.scss:./doc/rapidoc.css 24 watch_ts: 25 npx tsc --watch ./doc/main.ts --outFile ./doc/main.js 26 serve: 27 npx http-server doc -c-1 -p 8080 28 docs: lint bundle 29 npx sass -s compressed ./doc/main.scss:./doc/main.css ./doc/rapidoc.scss:./doc/rapidoc.css 30 npx tsc ./doc/main.ts --outFile ./doc/main.js 31 npx terser ./doc/main.js --compress --mangle -o ./doc/main.js 32 ruby: 33 openapi-generator-cli generate -i tmp/compiled.yaml -g ruby -o clients/ruby -c ./openapi-generator/ruby_lang.yaml 34 go: 35 openapi-generator-cli generate -i tmp/compiled.yaml -g go -o clients/go -c ./openapi-generator/go_lang.yaml --global-property apiTests=false,modelTests=false 36 go install golang.org/x/tools/cmd/goimports@latest 37 goimports -w clients/go 38 cd clients/go && go mod tidy 39 typescript: 40 openapi-generator-cli generate -i tmp/compiled.yaml -g typescript-fetch -o clients/typescript -c ./openapi-generator/typescript_lang.yaml 41 python: 42 openapi-generator-cli generate -i tmp/compiled.yaml -g python -o clients/python -c ./openapi-generator/python_lang.yaml 43 java: 44 openapi-generator-cli generate -i tmp/compiled.yaml -g java -o clients/java -c ./openapi-generator/java_lang.yaml 45 php: 46 openapi-generator-cli generate -i tmp/compiled.yaml -g php -o clients/php -c ./openapi-generator/php_lang.yaml 47 cli: 48 openapi-generator-cli generate -i tmp/compiled.yaml -g go -o tmp/cli -c ./openapi-generator/cli_lang.yaml -e handlebars 49 cp tmp/cli/api_* clients/cli/cmd/ 50 cp tmp/cli/README.md clients/cli/ 51 go install golang.org/x/tools/cmd/goimports@latest 52 goimports -w clients/cli 53 cd clients/cli && go mod tidy