-
-
Online XML Formatter
-
-
-
-
-
-
-
+
+
+
-
+
-
-
-
+
diff --git a/Frontend/tools/xpath.html b/Frontend/tools/xpath.html
index ad29e18..9179a2f 100644
--- a/Frontend/tools/xpath.html
+++ b/Frontend/tools/xpath.html
@@ -40,7 +40,7 @@
+ onclick="performFormatRequest('prettify', true, 'xmlArea', 'xmlArea')">Format XML
@@ -59,7 +59,7 @@
onfocus="clearDefaultContent(this, 'Insert XPath expression here');">
diff --git a/Frontend/tools/xsd.html b/Frontend/tools/xsd.html
index 749021e..d39ff63 100644
--- a/Frontend/tools/xsd.html
+++ b/Frontend/tools/xsd.html
@@ -28,7 +28,7 @@
+ onclick="performFormatRequest('prettify', true, 'xmlArea', 'xmlArea')">Format XML
@@ -50,7 +50,7 @@
onfocus="clearDefaultContent(this, 'Insert XSD here');">
+ onclick="performRequest('xsd', true, true)">Verify XSD
diff --git a/Frontend/tools/xslt.html b/Frontend/tools/xslt.html
index 83721d5..90d0abe 100644
--- a/Frontend/tools/xslt.html
+++ b/Frontend/tools/xslt.html
@@ -29,7 +29,7 @@
+ onclick="performFormatRequest('prettify', true, 'xmlArea', 'xmlArea')">Format XML
@@ -52,7 +52,7 @@
onfocus="clearDefaultContent(this, 'Insert XSLT here');">
+ onclick="performRequest('xslt', true, true)">Execute XSLT transform
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"
diff --git a/docker-compose.yml b/docker-compose.yml
index baed536..fa20468 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,7 +13,7 @@ services:
- 8086:80
xmltools-backend:
- build: ./Backend/xslt-rest
+ build: ./Backend/tools-services
container_name: xmltools-backend
image: xmltools-backend
ports:
diff --git a/readme.md b/readme.md
index 30694c5..e0e9ba1 100644
--- a/readme.md
+++ b/readme.md
@@ -11,7 +11,7 @@ Service is split into three microservices.
Main page is hosted on port 8086.
## API Documentation
-API documentation is available on port 8080/swagger/
+API documentation is available on port 8000/swagger/
## JavaSpark backend
Backend is hosted by default on port 8081. Rest api documentation is contained in OpenApi document