Browse Source

add Makefile targat to build clients from swagger docs

Mark deVilliers 2 years ago
parent
commit
7be15a4b2d
2 changed files with 7 additions and 2 deletions
  1. 7 2
      Makefile
  2. BIN
      tools/swagger-codegen-cli-2.2.1.jar

+ 7 - 2
Makefile

@@ -51,19 +51,24 @@ coverage: test_integration ## generate and display coverage report
51 51
 
52 52
 .PHONY: test_integration
53 53
 
54
-docker_up: ## run dependencies as docker containers
54
+docker-up: ## run dependencies as docker containers
55 55
 	docker-compose up -d
56 56
 	docker ps
57 57
 
58 58
 .PHONY: docker_up
59 59
 
60
-docker_build: clean linux-amd64 ## build docker images for all of the executables
60
+docker-build: clean linux-amd64 ## build docker images for all of the executables
61 61
 	docker build -t prototype/metadata:latest -t prototype/metadata:$(SOURCE_VERSION) -f=./docker/Dockerfile.metadata .
62 62
 	docker build -t prototype/node:latest -t prototype/node:$(SOURCE_VERSION) -f=./docker/Dockerfile.node .
63 63
 	docker build -t prototype/storage:latest -t prototype/storage:$(SOURCE_VERSION) -f=./docker/Dockerfile.storage .
64 64
 
65 65
 .PHONY: docker_build
66 66
 
67
+client-metadata: ## build golang client for the metadata service
68
+	java -jar ./tools/swagger-codegen-cli-2.2.1.jar generate -i http://localhost:8081/apidocs.json -l go -o ./client/metadata/
69
+
70
+.PHONY: client-metadata
71
+
67 72
 darwin-amd64: tmp/build/darwin-amd64/metadata tmp/build/darwin-amd64/storage tmp/build/darwin-amd64/node  ## build for mac amd64
68 73
 
69 74
 linux-i386: tmp/build/linux-i386/metadata tmp/build/linux-i386/storage tmp/build/linux-i386/node ## build for linux i386

BIN
tools/swagger-codegen-cli-2.2.1.jar