mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
(chore) daemon documentation and license clarification for docsify
This commit is contained in:
parent
e01976e7ae
commit
3e4aa9f957
5 changed files with 75 additions and 22 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
[API usage](docs/api)
|
||||
|
||||
[configurations](docs/configurations)
|
||||
|
||||
# Server information
|
||||
View [validator configuration](/server/config) or <a href="/server/health" target="_blank">health information</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 service expects a single plain input in the post body, e.g. `multipart/form-data` is not supported.
|
||||
|
||||
|
|
|
|||
15
src/main/resources/gui/docs/configurations.md
Normal file
15
src/main/resources/gui/docs/configurations.md
Normal 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
|
||||
|
|
@ -3,36 +3,48 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Validator</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="lib/vue.css">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width,initial-scale=1" name="viewport">
|
||||
<link href="lib/vue.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
|
||||
#result {
|
||||
border: 1pt solid black;
|
||||
margin-top: 20px
|
||||
}
|
||||
|
||||
#result:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var validate = function () {
|
||||
const input = document.getElementById('file');
|
||||
const output = document.getElementById('result');
|
||||
|
||||
var validate = function(){
|
||||
const input = document.getElementById('file');
|
||||
const data = input.files[0];
|
||||
const output = document.getElementById('result')
|
||||
var headers = new Headers();
|
||||
headers.append('Content-Type', 'application/xml');
|
||||
|
||||
var myHeaders = new Headers();
|
||||
myHeaders.append("Content-Type", "application/xml");
|
||||
var requestOptions = {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: input.files[0],
|
||||
redirect: 'follow',
|
||||
};
|
||||
|
||||
var requestOptions = {
|
||||
method: 'POST',
|
||||
headers: myHeaders,
|
||||
body: data,
|
||||
redirect: 'follow'
|
||||
};
|
||||
|
||||
fetch("http://localhost:8080", requestOptions)
|
||||
.then(response => response.text())
|
||||
.then(result => output.innerText = result)
|
||||
.catch(error => output.innerText = result);
|
||||
return false;
|
||||
}
|
||||
fetch('/', requestOptions)
|
||||
.then(response => response.text())
|
||||
.then(result => output.innerText = result)
|
||||
.catch(error => output.innerText = result);
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
|
|
|||
23
src/main/resources/gui/lib/License
Normal file
23
src/main/resources/gui/lib/License
Normal 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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue