Skip to content

Commit

Permalink
HMS-2191 refactor: remove metrics openapi
Browse files Browse the repository at this point in the history
This change remove metrics.openapi.* files, and update Makefile according to
that.

This is a special case as the /openapi.json endpoint, and to achieve this to
work, the openapi file becomes invalid with the specification for the path of
the endpoint; be aware the /metrics path could differ and the port where it will
be listening, depending on the clowder configuration.

Signed-off-by: Alejandro Visiedo <avisiedo@redhat.com>
  • Loading branch information
avisiedo committed Jan 23, 2024
1 parent d311632 commit a5ea997
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 100 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ $(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 $@)
Expand All @@ -61,7 +60,6 @@ $(TMP)/%/types.gen.go: %.openapi.yaml $(OAPI_CODEGEN)
validate: $(VALIDATOR)
$(VALIDATOR) public.openapi.yaml
$(VALIDATOR) internal.openapi.yaml
$(VALIDATOR) metrics.openapi.yaml

.PHONY: openapi-sort
openapi-sort: $(PYTHON_VENV)
Expand All @@ -71,7 +69,6 @@ openapi-sort: $(PYTHON_VENV)
vacuum: $(NODE_BIN)/vacuum
npm run vacuum:lint public.openapi.yaml
npm run vacuum:lint internal.openapi.yaml
npm run vacuum:lint metrics.openapi.yaml

.PHONY: swagger-editor
swagger-editor:
Expand All @@ -88,7 +85,7 @@ swagger-editor-stop:
podman stop $(SWAGGER_CONTAINER)

.PHONY: generate-json
generate-json: public.openapi.json internal.openapi.json metrics.openapi.json
generate-json: public.openapi.json internal.openapi.json

%.openapi.json: %.openapi.yaml $(PYTHON_VENV)
$(PYTHON_VENV) yaml2json.py $< $@
58 changes: 0 additions & 58 deletions metrics.openapi.json

This file was deleted.

37 changes: 0 additions & 37 deletions metrics.openapi.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a5ea997

Please sign in to comment.