From b8884a5e8c7098ed1b4682ff68fab6ef07b8d17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Ko=C5=82ecki?= Date: Wed, 1 Mar 2023 16:38:33 +0100 Subject: [PATCH] Created api documentation for json endpoints. --- Swagger/swagger.json | 88 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/Swagger/swagger.json b/Swagger/swagger.json index d180a3d..5732422 100644 --- a/Swagger/swagger.json +++ b/Swagger/swagger.json @@ -423,7 +423,89 @@ } } }, - "/xpathpost": { + "/json/formatting": { + "post": { + "tags": [ + "JSON" + ], + "summary": "Json validation and formatting.", + "description": "", + "operationId": "json", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "request", + "description": "A transform that is to be performed", + "required": true, + "schema": { + "example": "{'a': 'b', 'c': 'd'}" + } + } + ], + "responses": { + "200": { + "description": "Formatted JSON", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Error message from json formatting.", + "schema": { + "type": "string" + } + } + } + } + }, + "/json/minimize": { + "post": { + "tags": [ + "JSON" + ], + "summary": "Json validation and minimize formatting.", + "description": "", + "operationId": "json", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "request", + "description": "A transform that is to be performed", + "required": true, + "schema": { + "example": "{'a': 'b', 'c': 'd'}" + } + } + ], + "responses": { + "200": { + "description": "Formatted JSON", + "schema": { + "type": "string" + } + }, + "500": { + "description": "Error message from json formatting.", + "schema": { + "type": "string" + } + } + } + } + }, + "/xpath": { "post": { "tags": [ "XPath" @@ -470,7 +552,7 @@ } } }, - "/xsltpost": { + "/xslt": { "post": { "tags": [ "XSLT" @@ -517,7 +599,7 @@ } } }, - "/xsdpost": { + "/xsd": { "post": { "tags": [ "XSD"