diff --git a/CHANGELOG.md b/CHANGELOG.md index 07e06a0..7e1c78f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index c4672f7..d02d2d5 100644 --- a/README.md +++ b/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-`-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--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--standalone.jar -s -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). diff --git a/docs/contribute.md b/docs/contribute.md index 191f2e4..76d0d95 100644 --- a/docs/contribute.md +++ b/docs/contribute.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: \ No newline at end of file diff --git a/src/main/resources/gui/docs/api.md b/src/main/resources/gui/docs/api.md index dfd790e..dc84852 100644 --- a/src/main/resources/gui/docs/api.md +++ b/src/main/resources/gui/docs/api.md @@ -1 +1,41 @@ -Put content here ;) \ No newline at end of file +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 = ""; + +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)); +``` \ No newline at end of file