From c154a60538dbfe3c94e9386e23c6bea43ae4e422 Mon Sep 17 00:00:00 2001 From: Rolf Niepraschk <Rolf.Niepraschk@ptb.de> Date: Tue, 18 Aug 2020 08:29:46 +0200 Subject: [PATCH] ... --- README.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d292f1e..112b276 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,9 @@ File `config.json`: ### /validate endpoint [POST] ```shell -> curl -X POST -H "Content-Type: text/xml" -d @valid_xml_matches_xsd http://localhost:5005/validate -> <ok/> +curl -X POST -H "Content-Type: text/xml" -d @valid_xml_matches_xsd http://localhost:5005/validate + +<ok/> ``` Alternative call with `wget`: @@ -89,20 +90,23 @@ wget --post-file=example.xml --header="Content-Type:text/xml;" -q -O- http://loc ``` ```shell -> 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> +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> ``` ```shell -> curl -X POST -H "Content-Type: text/xml" -d @valid_xml_but_dont_matches_xsd http://localhost:5005/validate -> <error>verbose error message</error> +curl -X POST -H "Content-Type: text/xml" -d @valid_xml_but_dont_matches_xsd http://localhost:5005/validate + +<error>verbose error message</error> ``` Example: ```shell -> 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'): +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'): Reason: could not convert string to float: 'A' @@ -144,14 +148,15 @@ Path: /{https://intranet.ptb.de/fileadmin/dokumente/intranet/abteilungen/abteilu Returns the version of the validation server: ```shell -> curl http://localhost:5005/version -> <version>0.2.0</version> +curl http://localhost:5005/version + +<version>0.2.0</version> ``` ## Web interface ``` -http://127.0.0.1:5005/validation.html +http://localhost:5005/validation.html ``` A working PTB internal Service: -- GitLab