Skip to content
Snippets Groups Projects
Commit c154a605 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

...

parent d9bcdb42
No related branches found
No related tags found
No related merge requests found
...@@ -79,8 +79,9 @@ File `config.json`: ...@@ -79,8 +79,9 @@ File `config.json`:
### /validate endpoint [POST] ### /validate endpoint [POST]
```shell ```shell
> curl -X POST -H "Content-Type: text/xml" -d @valid_xml_matches_xsd http://localhost:5005/validate curl -X POST -H "Content-Type: text/xml" -d @valid_xml_matches_xsd http://localhost:5005/validate
> <ok/>
<ok/>
``` ```
Alternative call with `wget`: Alternative call with `wget`:
...@@ -89,20 +90,23 @@ wget --post-file=example.xml --header="Content-Type:text/xml;" -q -O- http://loc ...@@ -89,20 +90,23 @@ wget --post-file=example.xml --header="Content-Type:text/xml;" -q -O- http://loc
``` ```
```shell ```shell
> curl -X POST -H "Content-Type: text/xml?v=2.1.0" -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>
<error>unvalid xml data</error>
``` ```
```shell ```shell
> curl -X POST -H "Content-Type: text/xml" -d @valid_xml_but_dont_matches_xsd http://localhost:5005/validate curl -X POST -H "Content-Type: text/xml" -d @valid_xml_but_dont_matches_xsd http://localhost:5005/validate
> <error>verbose error message</error>
<error>verbose error message</error>
``` ```
Example: Example:
```shell ```shell
> curl -X POST -H "Content-Type: text/xml" -d @11044_17_DCC_v1.8.1_Au_with_error.xml http://localhost:5005/validate curl -X POST -H "Content-Type: text/xml" -d @11044_17_DCC_v1.8.1_Au_with_error.xml http://localhost:5005/validate
> <error>failed decoding 'A' with XsdAtomicBuiltin(name='xs:double'):
<error>failed decoding 'A' with XsdAtomicBuiltin(name='xs:double'):
Reason: could not convert string to float: 'A' Reason: could not convert string to float: 'A'
...@@ -144,14 +148,15 @@ Path: /{https://intranet.ptb.de/fileadmin/dokumente/intranet/abteilungen/abteilu ...@@ -144,14 +148,15 @@ Path: /{https://intranet.ptb.de/fileadmin/dokumente/intranet/abteilungen/abteilu
Returns the version of the validation server: Returns the version of the validation server:
```shell ```shell
> curl http://localhost:5005/version curl http://localhost:5005/version
> <version>0.2.0</version>
<version>0.2.0</version>
``` ```
## Web interface ## Web interface
``` ```
http://127.0.0.1:5005/validation.html http://localhost:5005/validation.html
``` ```
A working PTB internal Service: A working PTB internal Service:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment