2023-08-11 21:27:38 +03:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
|
|
PROTO_ARGS=" \
|
|
|
|
--proto_path=$(go list -f '{{ .Dir }}' -m github.com/envoyproxy/protoc-gen-validate) \
|
|
|
|
--proto_path=$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v4) \
|
|
|
|
--go_out=paths=source_relative:./proto \
|
|
|
|
--go-micro_out=paths=source_relative,components=micro|http,standalone=false:./proto \
|
2023-08-12 16:24:50 +03:00
|
|
|
--validate_out=paths=source_relative,lang=go:./proto \
|
|
|
|
--go-micro_out=components="openapiv3",openapi_file=./apidocs.swagger.yaml,debug=true,paths=source_relative:./proto
|
2023-08-11 21:27:38 +03:00
|
|
|
"
|
|
|
|
|
|
|
|
find ./proto -type f -name "*.pb.go" -delete
|
2023-08-12 16:24:50 +03:00
|
|
|
protoc -I./proto $PROTO_ARGS ./proto/*.proto || find ./proto -type f -name "*.pb.go" -delete
|
|
|
|
|
|
|
|
./ui/node_modules/.bin/ng-openapi-gen -i ./proto/apidocs.swagger.yaml -o ./ui/src/app/api --removeStaleFiles true --ignoreUnusedModels false
|