(chore) daemon documentation and license clarification for docsify

This commit is contained in:
Andreas Penski (init) 2020-05-29 09:03:16 +02:00
parent e01976e7ae
commit 3e4aa9f957
5 changed files with 75 additions and 22 deletions

View file

@ -2,6 +2,8 @@
[API usage](docs/api) [API usage](docs/api)
[configurations](docs/configurations)
# Server information # Server information
View [validator configuration](/server/config) or <a href="/server/health" target="_blank">health information</a> View [validator configuration](/server/config) or <a href="/server/health" target="_blank">health information</a>

View file

@ -1,3 +1,4 @@
# API Usage
The validation service listens to `POST`-requests to any server uri. You need to supply the xml/object to validate in the post body. The validation service listens to `POST`-requests to any server uri. You need to supply the xml/object to validate in the post body.
The service expects a single plain input in the post body, e.g. `multipart/form-data` is not supported. The service expects a single plain input in the post body, e.g. `multipart/form-data` is not supported.

View file

@ -0,0 +1,15 @@
# Configurations
The validator needs a scenario configuration for working properly.
Currently, there are two public third party validation configurations available.
* Validation Configuration for [XRechnung](http://www.xoev.de/de/xrechnung):
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung)
* [Releases](https://github.com/itplr-kosit/validator-configuration-xrechnung/releases) can also be downloaded
* Validation Configuration for [XGewerbeanzeige](https://xgewerbeanzeige.de/)
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige)
* [Releases](https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige/releases) can also be downloaded
For creating custom configurations see [configaration documentation](https://github.com/itplr-kosit/validator/blob/master/docs/configurations.md)
for details

View file

@ -3,36 +3,48 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Validator</title> <title>Validator</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta content="width=device-width,initial-scale=1" name="viewport">
<link rel="stylesheet" href="lib/vue.css"> <link href="lib/vue.css" rel="stylesheet">
<style>
#result {
border: 1pt solid black;
margin-top: 20px
}
#result:empty {
display: none;
}
</style>
</head> </head>
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
var validate = function () {
var validate = function(){
const input = document.getElementById('file'); const input = document.getElementById('file');
const data = input.files[0]; const output = document.getElementById('result');
const output = document.getElementById('result')
var myHeaders = new Headers(); var headers = new Headers();
myHeaders.append("Content-Type", "application/xml"); headers.append('Content-Type', 'application/xml');
var requestOptions = { var requestOptions = {
method: 'POST', method: 'POST',
headers: myHeaders, headers: headers,
body: data, body: input.files[0],
redirect: 'follow' redirect: 'follow',
}; };
fetch("http://localhost:8080", requestOptions) fetch('/', requestOptions)
.then(response => response.text()) .then(response => response.text())
.then(result => output.innerText = result) .then(result => output.innerText = result)
.catch(error => output.innerText = result); .catch(error => output.innerText = result);
return false; return false;
} };
</script> </script>

View file

@ -0,0 +1,23 @@
Sources in this diretory are based on https://github.com/docsifyjs/docsify/
MIT License
Copyright (c) 2016 - present cinwell.li
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.