Added missing docs and organized sample files (#97)

Co-authored-by: Adam Bem <adam.bem@zoho.eu>
Reviewed-on: R11/release11-tools-web#97
This commit is contained in:
2023-03-02 14:08:39 +01:00
parent c5190f7b62
commit fd95d7e845
23 changed files with 248 additions and 184 deletions

View File

@@ -30,6 +30,10 @@
{
"name": "Mocked services",
"description": "Mocked services controller"
},
{
"name": "XML Formatter",
"description": "XML formatting API"
}
],
"paths": {
@@ -38,7 +42,7 @@
"tags": [
"Mocked events"
],
"summary": "filterHistory",
"summary": "Filter History",
"operationId": "filterHistoryUsingPOST",
"consumes": [
"application/json"
@@ -84,7 +88,7 @@
"tags": [
"Mocked events"
],
"summary": "getLastDay",
"summary": "Get last day",
"operationId": "getLastDayUsingGET",
"produces": [
"*/*"
@@ -131,7 +135,7 @@
"tags": [
"Mocked services"
],
"summary": "updateMessage",
"summary": "Update message",
"operationId": "updateMessageUsingPUT",
"consumes": [
"application/json"
@@ -177,7 +181,7 @@
"tags": [
"Mocked services"
],
"summary": "getListOfMessages",
"summary": "Get list of messages",
"operationId": "getListOfMessagesUsingGET",
"produces": [
"*/*"
@@ -218,7 +222,7 @@
"tags": [
"Mocked services"
],
"summary": "getMockedResponse",
"summary": "Get response from mocked service",
"operationId": "getMockedResponseUsingGET",
"produces": [
"*/*"
@@ -300,7 +304,7 @@
"tags": [
"Mocked services"
],
"summary": "getListOfMessages",
"summary": "Get list of messages",
"operationId": "getListOfMessagesUsingGET_1",
"produces": [
"*/*"
@@ -383,7 +387,7 @@
"tags": [
"Mocked services"
],
"summary": "removeMessage",
"summary": "Remove message",
"operationId": "removeMessageUsingDELETE",
"produces": [
"*/*"
@@ -645,6 +649,100 @@
}
}
}
},
"/minimize": {
"post": {
"tags": [
"XML Formatter"
],
"summary": "Minimize given XML (only libxml)",
"description": "Removes any unneeded whitespace from given xml file",
"operationId": "minimize",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "request",
"description": "A XML to minimize",
"required": true,
"schema": {
"$ref": "#/definitions/RequestPrettify"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/MinimizedResponse"
}
}
},
"400": {
"description": "Invalid status value",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/XSDError"
}
}
}
}
}
},
"/prettify": {
"post": {
"tags": [
"XML Formatter"
],
"summary": "Prettify given XML (only libxml)",
"description": "Removes any unneeded whitespace from given xml file",
"operationId": "minimize",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "request",
"description": "A XML to prettify",
"required": true,
"schema": {
"$ref": "#/definitions/RequestMinimize"
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/MinimizedResponse"
}
}
},
"400": {
"description": "Invalid status value",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/XSDError"
}
}
}
}
}
}
},
"definitions": {
@@ -794,7 +892,7 @@
"properties": {
"data": {
"type": "string",
"example": " Test1 Test3 ",
"example": "<values><value>2</value><value>8</value></values>",
"description": "The XML data to be processed"
},
"process": {
@@ -824,7 +922,7 @@
"properties": {
"data": {
"type": "string",
"example": " Test1 Test3 ",
"example": "<values><value>2</value><value>8</value></values>",
"description": "The XML data to be processed"
},
"process": {
@@ -854,12 +952,12 @@
"properties": {
"data": {
"type": "string",
"example": " Ola Nordmann Langgt 23 4000 Stavanger Norway ",
"example": "<values><value>2</value><value>8</value></values>",
"description": "The XML data to be processed"
},
"process": {
"type": "string",
"example": " Ola Nordmann Langgt 23 4000 Stavanger Norway ",
"example": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"http://www.tibco.com/schemas/test/Test/Resources/Schema.xsd\" targetNamespace=\"http://www.tibco.com/schemas/test/Test/Resources/Schema.xsd\" elementFormDefault=\"qualified\" attributeFormDefault=\"unqualified\"> <xs:element name=\"values\"><xs:complexType><xs:sequence><xs:element name=\"value\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"unbounded\"/></xs:sequence></xs:complexType></xs:element></xs:schema>",
"description": "XSD to perform verification with"
},
"processor": {
@@ -896,7 +994,8 @@
"type": "string",
"enum": [
"Saxon 10.3 2.0 over s9api",
"Xalan Java 2.7.2"
"Xalan Java 2.7.2",
"libXml over lxml"
]
},
"status": {
@@ -924,7 +1023,8 @@
"type": "string",
"enum": [
"Saxon 10.3 2.0 over s9api",
"Xalan Java 2.7.2"
"Xalan Java 2.7.2",
"libXml over lxml"
]
},
"status": {
@@ -988,6 +1088,114 @@
]
}
}
},
"RequestPrettify": {
"type": "object",
"properties": {
"data": {
"type": "string",
"example": "<values><value>2</value><value>8</value></values>",
"description": "The XML data to be prettified"
},
"process": {
"type": "string",
"example": "",
"description": "Unused here, required only to use same json for whole project"
},
"processor": {
"type": "string",
"enum": [
"libxml"
]
},
"version": {
"type": "string",
"enum": [
"1.0"
]
}
}
},
"RequestMinimize": {
"type": "object",
"properties": {
"data": {
"type": "string",
"example": "<values><value>2</value><value>8</value></values>",
"description": "The XML data to be minimized"
},
"process": {
"type": "string",
"example": "",
"description": "Unused here, required only to use same json for whole project"
},
"processor": {
"type": "string",
"enum": [
"libxml"
]
},
"version": {
"type": "string",
"enum": [
"1.0"
]
}
}
},
"PrettifiedResponse": {
"type": "object",
"properties": {
"result": {
"type": "string",
"example": "<values>\\n\\t<value>2</value>\\n\\t<value>8</value>\\n</values>",
"description": "Prettified XML"
},
"time": {
"type": "string",
"example": "320",
"description": "Computation time in milliseconds"
},
"processor": {
"type": "string",
"enum": [
"libXml over lxml"
]
},
"status": {
"type": "string",
"enum": [
"OK"
]
}
}
},
"MinimizedResponse": {
"type": "object",
"properties": {
"result": {
"type": "string",
"example": "<values><value>2</value><value>8</value></values>",
"description": "Result of minimized provided XML"
},
"time": {
"type": "string",
"example": "320",
"description": "Computation time in milliseconds"
},
"processor": {
"type": "string",
"enum": [
"libXml over lxml"
]
},
"status": {
"type": "string",
"enum": [
"OK"
]
}
}
}
},
"externalDocs": {