Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
xml-validation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
xml-validation
Commits
320749b5
Commit
320749b5
authored
5 years ago
by
Rolf Niepraschk
Browse files
Options
Downloads
Patches
Plain Diff
clean up
parent
d3898e0b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+4
-49
4 additions, 49 deletions
README.md
config.json
+1
-3
1 addition, 3 deletions
config.json
with
5 additions
and
52 deletions
README.md
+
4
−
49
View file @
320749b5
...
...
@@ -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
)
.
This diff is collapsed.
Click to expand it.
config.json
+
1
−
3
View file @
320749b5
...
...
@@ -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/"
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment