From 320749b5349515dbccd5902420664aa55385c496 Mon Sep 17 00:00:00 2001
From: Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
Date: Thu, 31 Oct 2019 11:01:48 +0100
Subject: [PATCH] clean up

---
 README.md   | 53 ++++-------------------------------------------------
 config.json |  4 +---
 2 files changed, 5 insertions(+), 52 deletions(-)

diff --git a/README.md b/README.md
index 95e106b..0720886 100644
--- a/README.md
+++ b/README.md
@@ -13,28 +13,6 @@ REST service for the validation of ```xml``` against a XML Schema (```xsd```).
 > ./server
 ```
 
-The location of the ```xsd```-file can be configured in ```config.json```. 
-The default location is ```../xsd-dcc/dcc.xsd```:
-
-```shell
-├── xml-validation
-│   ├── config.json
-│   ├── README.md
-│   ├── server
-│   ├── server.py
-│   ├── share
-│   ├── utils.py
-│   ├── xml-validation.service
-│   └── xsd
-└── xsd-dcc
-    ├── dcc.xsd
-    ├── documentation
-    ├── examples
-    ├── README.md
-    ├── schemata
-    └── wiki
-```
-
 ## Installation as Daemon
 
 Do the following with root permission:
@@ -56,7 +34,8 @@ systemctl start xml-validation.service      # running?
 systemctl status xml-validation.service
 journalctl -f --unit xml-validation.service # run-time check
 # ...
-# git -c http.sslVerify=false pull 
+sudo -u nobody git -c http.sslVerify=false pull
+sudo systemctl restart xml-validation.service
 ```
 
 ## Configuration
@@ -72,21 +51,13 @@ File `config.json`:
     "dir":"."
   },
   "xsd":{
-    "mode":"inline,external,local",
     "filename":"dcc.xsd",
-    "localPath":"../xsd-dcc/",
     "externalBaseURL":"https://ptb.de/dcc/"
   }
 }
 ```
+<!-- TODO: Better "configFile: ..." with versions and paths inside -->
 
-* `mode`:
-  * `inline`:  Load XML schema from corresponding 'schemaLocation' attribute 
-    inside the XML target
-  * `external`:  Load XML schema from the URL build from 
-    'externalBaseURL' and 'filename'
-  * `local`:  Load XML schema from the local file build from 'localPath' and 
-  'filename'
 * `localPath`: Must be ended with a path seperator
 * `externalBaseURL`: Must be ended with a path seperator
   
@@ -101,7 +72,7 @@ File `config.json`:
 ```
 
 ```shell
-> curl -X POST -H "Content-Type: text/xml" -d @no_valid_xml http://localhost:5005/validate
+> curl -X POST -H "Content-Type: text/xml?v=2.1.0" -d @no_valid_xml http://localhost:5005/validate
 > <error>unvalid xml data</error>
 ```
 
@@ -159,19 +130,3 @@ Returns the version of the validation server:
 > curl http://localhost:5005/version
 > <version>0.2.0</version>
 ```
-
-### /version_xsd [GET]
-
-Returns the version of the xsd-definition. The version is given at
-`xmlRoot.annotation.documentation`
-
-```shell
-> curl http://localhost:5005/version_xsd
-<version>1.9.2</version>
-``
-
-### /update [POST]
-
-Updates the server; used by webhook (no security checks so far).
-
-
diff --git a/config.json b/config.json
index 87be298..31dcb88 100644
--- a/config.json
+++ b/config.json
@@ -7,9 +7,7 @@
     "dir":"."
   },
   "xsd":{
-    "mode":"inline,external,local",
     "filename":"dcc.xsd",
-    "localPath":"../xsd-dcc/",
-    "externalBaseURL":"https://www.ptb.de/dcc/"
+    "externalBaseURL":"https://ptb.de/dcc/"
   }
 }
-- 
GitLab