From 5d87658a6f12203bced014d49072225fea23b104 Mon Sep 17 00:00:00 2001 From: Paolo Patierno Date: Mon, 23 Dec 2024 11:41:29 +0100 Subject: [PATCH] Updated OpenAPI specification and documentation Signed-off-by: Paolo Patierno --- ...n-overview-open-api-spec-kafka-bridge.adoc | 2 +- src/main/resources/openapi.json | 22 +++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/documentation/modules/con-overview-open-api-spec-kafka-bridge.adoc b/documentation/modules/con-overview-open-api-spec-kafka-bridge.adoc index c369f9a7..2130f7f7 100644 --- a/documentation/modules/con-overview-open-api-spec-kafka-bridge.adoc +++ b/documentation/modules/con-overview-open-api-spec-kafka-bridge.adoc @@ -13,7 +13,7 @@ The Kafka Bridge OpenAPI specification is in JSON format. You can find the OpenAPI JSON files in the `src/main/resources/` folder of the Kafka Bridge source download files. The download files are available from the {ReleaseDownload}. -You can also use the xref:openapi[`GET /openapi` method] to retrieve the OpenAPI v2 specification in JSON format. +You can also use the xref:openapi[`GET /openapi` method] to retrieve the OpenAPI v3 specification in JSON format. [role="_additional-resources"] .Additional resources diff --git a/src/main/resources/openapi.json b/src/main/resources/openapi.json index e14b1a40..dc51164f 100644 --- a/src/main/resources/openapi.json +++ b/src/main/resources/openapi.json @@ -1415,29 +1415,37 @@ } } }, - "description": "OpenAPI v2 specification in JSON format retrieved successfully." + "description": "OpenAPI v3 specification in JSON format retrieved successfully." } }, "operationId": "openapi", - "description": "Retrieves the OpenAPI v2 specification in JSON format." + "description": "Retrieves the OpenAPI v3 specification in JSON format." } }, "/openapi/v2": { "get": { "responses": { - "200": { + "410": { "content": { - "application/json": { + "application/vnd.kafka.v2+json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Error" + }, + "examples": { + "response": { + "value": { + "error_code": 410, + "message": "OpenAPI v2 Swagger not supported." + } + } } } }, - "description": "OpenAPI v2 specification in JSON format retrieved successfully." + "description": "OpenAPI v2 Swagger not supported." } }, "operationId": "openapiv2", - "description": "Retrieves the OpenAPI v2 specification in JSON format." + "description": "OpenAPI v2 Swagger not supported." } }, "/openapi/v3": {