diff --git a/Makefile b/Makefile index 6c152fc..41c293d 100644 --- a/Makefile +++ b/Makefile @@ -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 $@) @@ -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) @@ -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: @@ -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 $< $@ diff --git a/metrics.openapi.json b/metrics.openapi.json deleted file mode 100644 index 74eb3ae..0000000 --- a/metrics.openapi.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Instrumentation API", - "description": "Example of API design first approach and using golang stack (viper+echo+gorm+confluent+cleanarchitecture)", - "termsOfService": "https://console.redhat.com/api/idmsvc/v1", - "version": "0.0.1" - }, - "servers": [ - { - "description": "Use for Development", - "url": "/metrics" - } - ], - "paths": { - "/": { - "get": { - "description": "Endpoint to expose the metrics for the instrumentation component", - "summary": "Expose the metrics", - "operationId": "getMetrics", - "responses": { - "200": { - "$ref": "#/components/responses/Metrics" - } - }, - "tags": [ - "metrics" - ] - } - } - }, - "components": { - "responses": { - "Metrics": { - "description": "Metrics response", - "content": { - "text/plain; version=0.0.4; charset=utf-8": { - "schema": { - "$ref": "#/components/schemas/Data" - } - } - } - } - }, - "schemas": { - "Data": { - "description": "Metrics schema as text/plain", - "type": "string" - } - } - }, - "tags": [ - { - "name": "metrics", - "description": "instrumentation endpoint" - } - ] -} \ No newline at end of file diff --git a/metrics.openapi.yaml b/metrics.openapi.yaml deleted file mode 100644 index 27fd416..0000000 --- a/metrics.openapi.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -openapi: 3.0.3 -# https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#info-object -info: - title: Instrumentation API - description: Example of API design first approach and using golang stack (viper+echo+gorm+confluent+cleanarchitecture) - termsOfService: https://console.redhat.com/api/idmsvc/v1 - version: 0.0.1 -servers: - - description: Use for Development - url: /metrics -paths: - /: - get: - description: Endpoint to expose the metrics for the instrumentation component - summary: Expose the metrics - operationId: getMetrics - responses: - '200': - $ref: '#/components/responses/Metrics' - tags: - - metrics -components: - responses: - Metrics: - description: Metrics response - content: - text/plain; version=0.0.4; charset=utf-8: - schema: - $ref: '#/components/schemas/Data' - schemas: - Data: - description: Metrics schema as text/plain - type: string -tags: - - name: metrics - description: instrumentation endpoint diff --git a/package-lock.json b/package-lock.json index 6ca841a..3a2ca97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "idmsvc-api", + "name": "api", "lockfileVersion": 3, "requires": true, "packages": {