From: halil.cakal Date: Tue, 26 Jul 2022 08:17:00 +0000 (+0100) Subject: Downloadable json and yaml files, rendered example values X-Git-Tag: 1.0.0~5 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=0c5ffc5619127ed1d1632c68a74304231a603700;p=nonrtric%2Fplt%2Frappcatalogue.git Downloadable json and yaml files, rendered example values Issue-ID: NONRTRIC-777 Change-Id: I6b995d76edccca3c567054f204125763ba24eb01 Signed-off-by: halil.cakal --- diff --git a/api/rac-api.json b/api/rac-api.json index 64f19d8..a6615f0 100644 --- a/api/rac-api.json +++ b/api/rac-api.json @@ -26,7 +26,16 @@ "items": { "$ref": "#/components/schemas/service" } - } + }, + "example": [ + { + "name": "DroneIdentifier", + "version": "1.0.0", + "display_name": "Drone Identifier", + "description": "Detects if a UE is a drone", + "registrationDate": "2020-11-03" + } + ] } } } @@ -48,6 +57,13 @@ "application/json": { "schema": { "$ref": "#/components/schemas/service" + }, + "example": { + "name": "DroneIdentifier", + "version": "1.0.0", + "display_name": "Drone Identifier", + "description": "Detects if a UE is a drone", + "registrationDate": "2020-11-03" } } } @@ -58,6 +74,10 @@ "application/json": { "schema": { "$ref": "#/components/schemas/error_information" + }, + "example": { + "detail": "Service not found", + "status": 404 } } } @@ -131,6 +151,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/inputService" + }, + "example": { + "version": "1.0.0", + "display_name": "Drone Identifier", + "description": "Detects if a UE is a drone" } } } diff --git a/docs/api-docs.rst b/docs/api-docs.rst index a0db8f8..bea573b 100644 --- a/docs/api-docs.rst +++ b/docs/api-docs.rst @@ -23,6 +23,15 @@ Non-RT-RIC App Catalogue (Initial) The Service Catalogue provides a way for services to register themselves for other services to discover. +The API is also described in Swagger-JSON and YAML: + + +.. csv-table:: + :header: "API name", "|swagger-icon|", "|yaml-icon|" + :widths: 10,5, 5 + + "App Catalogue API", ":download:`link <../api/rac-api.json>`", ":download:`link <../api/rac-api.yaml>`" + .. Generates content from rac-api.json .. openapi:: ../api/rac-api.json :examples: