go-redfish/Makefile
James Gu c442eb5bcb Upgrade openapi generator to v5.1.0
Upgraded openapi generator version to 5.1.0 for the support of nullable
values for optional fields; Added missing "Disabled" enum value to the
BootSourceOverrideEnabled model in the openapi schema.

Signed-off-by: James Gu <james.gu@att.com>
Change-Id: Ia3e0b018be13079d2085ef61ed2e797bcfd25fd7
2021-05-05 10:18:32 -04:00

32 lines
1013 B
Makefile

.PHONY: code-gen
code-gen:
rm -rf client
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
mkdir -p api
go run api_generator.go | gofmt > api/service_interface.go
go generate api/service_interface.go
.PHONY: code-gen-docker
code-gen-docker:
rm -rf client
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v5.1.0 generate \
-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
.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