Skip to content

Commit

Permalink
chore(HMS-2680): clean-up make rules
Browse files Browse the repository at this point in the history
Remove some old rules remaining when the openapi was specified on the
backend repository.

Signed-off-by: Alejandro Visiedo <[email protected]>
  • Loading branch information
avisiedo committed Jan 31, 2024
1 parent c2861c8 commit 4811f93
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,6 @@ $(NODE_BIN)/%: package.json package-lock.json
npm install
touch $(NODE_BIN)/*

$(OAPI_CODEGEN):
GOBIN=$(CURDIR)/$(BIN) go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@$(OAPI_CODEGEN_VERSION)

.PHONY: oapi-codegen
oapi-codegen: \
$(TMP)/public/spec.gen.go $(TMP)/public/server.gen.go $(TMP)/public/types.gen.go \
$(TMP)/internal/spec.gen.go $(TMP)/internal/server.gen.go $(TMP)/internal/types.gen.go \
$(TMP)/metrics/spec.gen.go $(TMP)/metrics/server.gen.go $(TMP)/metrics/types.gen.go

$(TMP)/%/spec.gen.go: %.openapi.yaml $(OAPI_CODEGEN)
@mkdir -p $(dir $@)
$(OAPI_CODEGEN) -generate spec -package $* -o $(TMP)/$*/spec.gen.go $<

$(TMP)/%/server.gen.go: %.openapi.yaml $(OAPI_CODEGEN)
@mkdir -p $(dir $@)
$(OAPI_CODEGEN) -generate server -package $* -o $(TMP)/$*/server.gen.go $<

$(TMP)/%/types.gen.go: %.openapi.yaml $(OAPI_CODEGEN)
@mkdir -p $(dir $@)
$(OAPI_CODEGEN) -generate types -package $* -o $(TMP)/$*/types.gen.go $<

.PHONY: validate
validate: $(VALIDATOR)
$(VALIDATOR) public.openapi.yaml
Expand Down

0 comments on commit 4811f93

Please sign in to comment.