mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
prepare docs for release 1.3.0
This commit is contained in:
parent
fdd2a5be18
commit
06a88848db
4 changed files with 61 additions and 18 deletions
|
|
@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
|
||||
## next version (unreleased)
|
||||
## 1.3.0
|
||||
|
||||
### Added
|
||||
- Added a builder style configuration API to configure scenarios
|
||||
|
|
@ -19,11 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- CheckConfiguration is deprecated now. Use Configuration.load(...) or Configuration.build(...)
|
||||
- Overall processing of xml files is based on Saxon s9api. No JAXP or SAX classes are used by
|
||||
the validator (this further improves performance and memory consumption)
|
||||
-
|
||||
|
||||
## UNRELEASED
|
||||
### Fixed
|
||||
- Validator was creating invalid createReportInput xml in case of no scenrio match
|
||||
- Validator was creating invalid createReportInput xml in case of no scenrio match
|
||||
|
||||
|
||||
## 1.2.0
|
||||
### Added
|
||||
|
|
|
|||
19
README.md
19
README.md
|
|
@ -3,6 +3,8 @@
|
|||
The validator is an XML validation-engine. It validates XML documents against XML Schema and Schematron Rules depending on self defined [scenarios](docs/configurations.md) which are used to fully configure the validation process.
|
||||
The validator always outputs a [validation report in XML](docs/configurations.md#validators-report) including all validation errors and data about the validation.
|
||||
|
||||
See [architecture](docs/architecture.md) for informations about the actual validation process.
|
||||
|
||||
## Packages
|
||||
|
||||
The validator distribution contains the following artifacts:
|
||||
|
|
@ -12,16 +14,6 @@ The validator distribution contains the following artifacts:
|
|||
1. **validationtool-`<version`>-java8-standalone.jar**: Uber-JAR for standalone usage with Java JDK 8 containing all dependencies in one jar file. This file file *does not* contain JAXB and depends on the bundled version of the JDK.
|
||||
1. **libs/***: directory containing all (incl. optional) dependencies of the validator
|
||||
|
||||
## Build
|
||||
|
||||
### Requirements
|
||||
|
||||
* Maven > 3.0.0
|
||||
* Java > 8 update 111
|
||||
|
||||
### Procedure
|
||||
|
||||
`mvn install` generates two different packages in the `dist` directory:
|
||||
|
||||
## Validation Configurations
|
||||
|
||||
|
|
@ -29,7 +21,7 @@ The validator is just an engine and does not know anything about XML Documents a
|
|||
|
||||
Validation rules and details are defined in [validation scenarios](docs/configurations.md) which are used to fully configure the validation process.
|
||||
|
||||
All configurations are self-contained modules and deployed on their own.
|
||||
All configurations are self-contained modules and deployed and developed on their own.
|
||||
|
||||
### Third Party Validation Configurations
|
||||
|
||||
|
|
@ -64,7 +56,8 @@ You can see more CLI options with
|
|||
java -jar validationtool-<version>-standalone.jar --help
|
||||
```
|
||||
|
||||
A concrete example with a specific validator configuration can be found on [GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung)
|
||||
A concrete example with a specific validator configuration can be found on
|
||||
[GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung)
|
||||
|
||||
### Application User Interface (API / embedded usage)
|
||||
|
||||
|
|
@ -97,5 +90,5 @@ You can configure it with `-H` for IP Adress and `-P` for port number:
|
|||
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file> -D -H 192.168.1.x -P 8081
|
||||
```
|
||||
|
||||
Details and further configuration options can be [found here](./docs/daemon.md).
|
||||
Usage details and further configuration options can be [found here](./docs/daemon.md).
|
||||
|
||||
|
|
|
|||
|
|
@ -25,3 +25,14 @@ due to historical reasons. This not only works in Eclipse but also in IntelliJ (
|
|||
The configuration can be found in `.settings`-directory. For IntelliJ this is all set up. Additionally this should work in Eclipse out of the box.
|
||||
Another potential usage scenario would be to integrate the formatter via git hooks into the commit-pipeline (e.g [Example Hook](https://gist.github.com/ktoso/708972) ).
|
||||
For other IDEs you are on your own.
|
||||
|
||||
## Build
|
||||
|
||||
### Requirements
|
||||
|
||||
* Maven > 3.0.0
|
||||
* Java > 8 update 111
|
||||
|
||||
### Procedure
|
||||
|
||||
`mvn install` generates two different packages in the `dist` directory:
|
||||
|
|
@ -1 +1,41 @@
|
|||
Put content here ;)
|
||||
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.
|
||||
|
||||
Examples:
|
||||
|
||||
* `cURL`
|
||||
```shell script
|
||||
curl --location --request POST 'http://localhost:8080' \
|
||||
--header 'Content-Type: application/xml' \
|
||||
--data-binary '@/target.xml'
|
||||
```
|
||||
|
||||
* `java` (Apache HttpClient)
|
||||
```java
|
||||
HttpClient httpClient = HttpClientBuilder.create().build();
|
||||
HttpPost postRequest = new HttpPost("http://localhost:8080/");
|
||||
FileEntity entity = new FileEntity(Paths.get("some.xml").toFile(), ContentType.APPLICATION_XML);
|
||||
postRequest.setEntity(entity);
|
||||
HttpResponse response = httpClient.execute(postRequest);
|
||||
System.out.println(IOUtils.toString(response.getEntity().getContent()));
|
||||
```
|
||||
|
||||
* `javascript`
|
||||
```javascript
|
||||
var myHeaders = new Headers();
|
||||
myHeaders.append("Content-Type", "application/xml");
|
||||
|
||||
var file = "<file contents here>";
|
||||
|
||||
var requestOptions = {
|
||||
method: 'POST',
|
||||
headers: myHeaders,
|
||||
body: file,
|
||||
redirect: 'follow'
|
||||
};
|
||||
|
||||
fetch("http://localhost:8080", requestOptions)
|
||||
.then(response => response.text())
|
||||
.then(result => console.log(result))
|
||||
.catch(error => console.log('error', error));
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue