2019-09-08 23:55:37 +03:00
|
|
|
.PHONY: code-gen
|
|
|
|
code-gen:
|
2019-09-09 14:54:37 +03:00
|
|
|
rm -rf client
|
2020-01-09 16:48:00 +00:00
|
|
|
openapi-generator generate -i ./spec/openapi.yaml -g go --package-name "client" --git-repo-id go-redfish/client --git-user-id airship --git-host opendev.org -o client/ -p enumClassPrefix=true
|
2019-10-08 15:06:06 +03:00
|
|
|
mkdir -p api
|
|
|
|
go run api_generator.go | gofmt > api/service_interface.go
|
|
|
|
go generate api/service_interface.go
|
|
|
|
|
2020-03-31 02:21:24 -05:00
|
|
|
.PHONY: code-gen-docker
|
|
|
|
code-gen-docker:
|
|
|
|
rm -rf client
|
2021-05-05 10:18:32 -04:00
|
|
|
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v5.1.0 generate \
|
2020-03-31 02:21:24 -05:00
|
|
|
-i /local/spec/openapi.yaml \
|
|
|
|
-g go \
|
|
|
|
--package-name "client" \
|
|
|
|
--git-repo-id go-redfish/client \
|
|
|
|
--git-user-id airship \
|
|
|
|
--git-host opendev.org \
|
|
|
|
-p enumClassPrefix=true \
|
|
|
|
-o /local/client
|
|
|
|
mkdir -p api
|
|
|
|
go run api_generator.go | gofmt > api/service_interface.go
|
|
|
|
go generate api/service_interface.go
|
|
|
|
|
2019-09-08 23:55:37 +03:00
|
|
|
|
|
|
|
.PHONY: deps
|
|
|
|
deps:
|
|
|
|
go get github.com/stretchr/testify/assert
|
|
|
|
go get golang.org/x/oauth2
|
|
|
|
go get golang.org/x/net/context
|
|
|
|
go get github.com/antihax/optional
|