mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Updated to new JS component versions; #153
This commit is contained in:
parent
1f859bc678
commit
3d783857ab
67 changed files with 555 additions and 236 deletions
|
|
@ -14,22 +14,22 @@ Examples:
|
|||
|
||||
```shell script
|
||||
curl --location --request POST 'http://localhost:8080' \
|
||||
--header 'Content-Type: application/xml' \
|
||||
--data-binary '@/target.xml'
|
||||
--header 'Content-Type: application/xml' \
|
||||
--data-binary '@/target.xml'
|
||||
```
|
||||
|
||||
* `java` (Apache HttpClient)
|
||||
* `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()));
|
||||
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`
|
||||
|
||||
```javascript
|
||||
var myHeaders = new Headers();
|
||||
|
|
@ -48,4 +48,4 @@ fetch("http://localhost:8080", requestOptions)
|
|||
.then(response => response.text())
|
||||
.then(result => console.log(result))
|
||||
.catch(error => console.log('error', error));
|
||||
```
|
||||
```
|
||||
|
|
|
|||
|
|
@ -2,30 +2,79 @@
|
|||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
# 1.5.0
|
||||
## 1.6.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- (DOC) [GitHub PR#166](https://github.com/itplr-kosit/validator/pull/166) Fixed broken links in `docs/api.md`
|
||||
|
||||
### Changed
|
||||
|
||||
- (CORE) Migration from javax to jakarta xml bind
|
||||
- (DOC) [GitHub PR#132](https://github.com/itplr-kosit/validator/pull/132) Updated the link to the example Validator scenario configuration
|
||||
|
||||
### Removed
|
||||
|
||||
- (CORE) java 8 support. new default jdk 11
|
||||
|
||||
## 1.5.2 - 2025-09-01
|
||||
|
||||
### Fixed
|
||||
|
||||
- (BUILD) [#148](https://projekte.kosit.org/kosit/validator/-/issues/148) Regression that due to renaming from `validationtool` to `validator` the distribution zip did not contain all jars anymore
|
||||
|
||||
## 1.5.1 - 2025-09-01
|
||||
|
||||
### Fixed
|
||||
|
||||
- (CORE) [#130](https://projekte.kosit.org/kosit/validator/-/issues/130) Check result to stdout causes an exception. This also fixes [GitHub #131](https://github.com/itplr-kosit/validator/issues/131)
|
||||
- (CORE) [#131](https://projekte.kosit.org/kosit/validator/-/issues/131) `UnsupportedOperationException` because of read-only list. This also fixes [GitHub #136](https://github.com/itplr-kosit/validator/issues/136)
|
||||
- (CLI) [#104](https://projekte.kosit.org/kosit/validator/-/issues/104) made the usage of the `-r` parameter optional, if only one unnamed scenario is used
|
||||
- (CLI) [#145](https://projekte.kosit.org/kosit/validator/-/issues/145) If the CLI is invoked without any parameter, the usage is shown twice
|
||||
- (DOC) [#129](https://projekte.kosit.org/kosit/validator/-/issues/129) API documentation is outdated. This also fixes [GitHub #130](https://github.com/itplr-kosit/validator/issues/130)
|
||||
- (BUILD) [#62](https://projekte.kosit.org/kosit/validator/-/issues/62) Surefire Test Error running `de.kosit.validationtool.impl.xml.RemoteResolvingStrategyTest` fails without `http.proxy` setting
|
||||
- (BUILD) [#110](https://projekte.kosit.org/kosit/validator/-/issues/110) reactivated the GitLab CI environment
|
||||
|
||||
### Added
|
||||
|
||||
- (BUILD) [#140](https://projekte.kosit.org/kosit/validator/-/issues/140) prepare pom.xml to be able to release to Maven Central
|
||||
- (BUILD) [#144](https://projekte.kosit.org/kosit/validator/-/issues/144) created a Maven profile to release on Maven Central
|
||||
|
||||
### Changed
|
||||
|
||||
- (CORE) [#109](https://projekte.kosit.org/kosit/validator/-/issues/109) dependencies were updated to the latest Java 1.8 compatible versions
|
||||
- Bump [Saxon HE](https://www.saxonica.com/documentation11/documentation.xml) to 12.8
|
||||
- Bump [jaxb-ri](https://github.com/eclipse-ee4j/jaxb-ri) to 2.3.9
|
||||
- Bump [SLF4J](https://www.slf4j.org/) to 2.0.17
|
||||
- (CORE) [#136](https://projekte.kosit.org/kosit/validator/-/issues/136) removed IDE project folders from git
|
||||
- (BUILD) [#135](https://projekte.kosit.org/kosit/validator/-/issues/135) protected specific git branches
|
||||
- (BUILD) [#137](https://projekte.kosit.org/kosit/validator/-/issues/137) GitLab CI should only run on Java LTS versions as well as the latest Java version
|
||||
- (BUILD) [#147](https://projekte.kosit.org/kosit/validator/-/issues/147) Change Maven coordinates from `de.kosit:validationtool` to `org.kosit:validator`
|
||||
|
||||
## 1.5.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- (CLI) [#93](https://projekte.kosit.org/kosit/validator/-/issues/93) Remove usage information, when validation failed
|
||||
- (CLI) [#95](https://projekte.kosit.org/kosit/validator/-/issues/95) NPE when using empty repository definition (-r "")
|
||||
- (CORE) [GitHub #101](https://github.com/itplr-kosit/validator/issues/101) Role is null in FailedAssert
|
||||
|
||||
### Added
|
||||
|
||||
- (CLI) Support for multiple configurations and multiple repositories. See [cli documentation](https://github.com/itplr-kosit/validator/blob/master/docs/cli.md) for details
|
||||
- (CLI) Support for multiple configurations and multiple repositories. See [cli documentation](docs/cli.md) for details
|
||||
- (API) Possibility to use preconfigured Saxon `Processor` instance for validation
|
||||
|
||||
### Changed
|
||||
|
||||
- (CORE) [GitHub #100](https://github.com/itplr-kosit/validator/issues/100) Make createReport optional
|
||||
- (DAEMON) UI rewrite based on [Docusaurs](https://docusaurus.io)
|
||||
- (
|
||||
API) [ResolvingConfigurationStrategy.java#getProcessor()](https://github.com/itplr-kosit/validator/blob/master/src/main/java/de/kosit/validationtool/api/ResolvingConfigurationStrategy)
|
||||
is removed.
|
||||
- (API) [ResolvingConfigurationStrategy.java#getProcessor()](de/kosit/validationtool/api/ResolvingConfigurationStrategy) is removed.
|
||||
- (CORE) Bump [Saxon HE](https://www.saxonica.com/documentation11/documentation.xml) to 11.4
|
||||
- (CORE) Bump [jaxb-ri](https://github.com/eclipse-ee4j/jaxb-ri) to 2.3.7
|
||||
|
||||
- (CORE) Various other dependency updates. See pom.xml
|
||||
- (CORE) CLI parsing based on pico-cli, commons-cli is removed
|
||||
|
||||
## 1.4.2
|
||||
|
|
@ -36,14 +85,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- [#80](https://github.com/itplr-kosit/validator/issues/80) using classloader to initialize jaxb context (to support
|
||||
usage in OSGi
|
||||
environments)
|
||||
- [#75] (https://github.com/itplr-kosit/validator/issues/75) Improve logging on invalid documents
|
||||
- [#75](https://github.com/itplr-kosit/validator/issues/75) Improve logging on invalid documents
|
||||
|
||||
## 1.4.1
|
||||
|
||||
### Fixed
|
||||
|
||||
- Allow more than 3 customLevel elements in scenarios (see xrechnung
|
||||
configuration [ issue 49](https://github.com/itplr-kosit/validator-configuration-xrechnung/issues/49))
|
||||
configuration [issue 49](https://github.com/itplr-kosit/validator-configuration-xrechnung/issues/49))
|
||||
- Remove saxon signature from java8 uber-jar (see [67](https://github.com/itplr-kosit/validator/issues/67))
|
||||
|
||||
## 1.4.0
|
||||
|
|
@ -71,14 +120,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- InputFactory has methods to read any java.xml.transform.Source as Input not only StreamSources
|
||||
- InputFactory uses a generated UUID as name for SourceInput, if no "real" name can be derived
|
||||
- saxon dependency update (minor, 9.9.1-7)
|
||||
- [DAEMON] proper status codes when returning results (see [daemon documentation](https://github.com/itplr-kosit/validator/blob/master/docs/daemon.md#status-codes))
|
||||
- [DAEMON] proper status codes when returning results (see [daemon documentation](./docs/daemon.md#status-codes))
|
||||
|
||||
## 1.3.1
|
||||
|
||||
### Fixed
|
||||
|
||||
- `getFailedAsserts()` and `isSchematronValid()`
|
||||
in [DefaultResult.java](https://github.com/itplr-kosit/validator/blob/master/src/main/java/de/kosit/validationtool/impl/DefaultResult.java)
|
||||
in [DefaultResult.java](https://github.com/itplr-kosit/validator/blob/main/src/main/java/de/kosit/validationtool/impl/DefaultResult.java)
|
||||
do not reflect actual schematron validation result
|
||||
- processing aborts on schematron execution errors (e.g. errors within schematron logic). The validator now generates a
|
||||
report in such cases.
|
||||
|
|
@ -126,20 +175,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Added
|
||||
|
||||
- Provide access to schematron result
|
||||
through [Result.java](https://github.com/itplr-kosit/validator/blob/master/src/main/java/de/kosit/validationtool/api/Result.java)
|
||||
- *Result#getFailedAsserts()* returns a list of failed asserts found by schematron
|
||||
- *Result#isSchematronValid()* convinience access to evaluate whether schematron was processed without any *
|
||||
FailedAsserts*
|
||||
through [Result.java](https://github.com/itplr-kosit/validator/blob/main/src/main/java/de/kosit/validationtool/api/Result.java)
|
||||
- _Result#getFailedAsserts()_ returns a list of failed asserts found by schematron
|
||||
- _Result#isSchematronValid()_ convinience access to evaluate whether schematron was processed without any _
|
||||
FailedAsserts_
|
||||
|
||||
### Changed
|
||||
|
||||
- *Result#getAcceptRecommendation()* does not _only_ work when _acceptMatch_ is configured in the scenario
|
||||
- _Result#getAcceptRecommendation()_ does not _only_ work when _acceptMatch_ is configured in the scenario
|
||||
- schema correctness is a precondition, if the checked instance is not valid, this evaluates to _REJECTED_
|
||||
- if _acceptMatch_ is configured, the result is based on the boolean result of the xpath expression evaluated against
|
||||
the generated report
|
||||
- if *no* _acceptMatch_ is configured, the result is based on evaluation of schema and schematron correctness
|
||||
- if _no_ _acceptMatch_ is configured, the result is based on evaluation of schema and schematron correctness
|
||||
- _UNDEFINED_ is only returned, when processing is stopped somehow
|
||||
- *Result#isAcceptable()* can now evaluate to true, when no _acceptMatch_ is configured (see above)
|
||||
- _Result#isAcceptable()_ can now evaluate to true, when no _acceptMatch_ is configured (see above)
|
||||
|
||||
## 1.1.3
|
||||
|
||||
|
|
|
|||
|
|
@ -6,15 +6,19 @@ sidebar_position: 1
|
|||
|
||||
The validator needs a scenario configuration for working properly.
|
||||
|
||||
Currently, there are two public third party validation configurations available.
|
||||
Here are some public validation configurations:
|
||||
|
||||
* Validation Configuration for [XRechnung](http://www.xoev.de/de/xrechnung):
|
||||
* Validation Configuration for [XRechnung](https://xeinkauf.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 [Peppol BIS Billing](https://docs.peppol.eu/poacc/billing/3.0/):
|
||||
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-bis)
|
||||
* [Releases](https://github.com/itplr-kosit/validator-configuration-bis/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 [configuration documentation](https://github.com/itplr-kosit/validator/blob/master/docs/configurations.md)
|
||||
see [configuration documentation](https://github.com/itplr-kosit/validator/blob/main/docs/configurations.md)
|
||||
for details
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const lightCodeTheme = require("prism-react-renderer/themes/github");
|
||||
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
|
||||
const lightCodeTheme = require("prism-react-renderer").themes.github;
|
||||
const darkCodeTheme = require("prism-react-renderer").themes.dracula;
|
||||
const pkg = require("./package.json");
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
|
|
@ -28,7 +28,7 @@ const config = {
|
|||
tagline: "Validating any XML",
|
||||
url: "https://your-docusaurus-test-site.com",
|
||||
baseUrl: "/",
|
||||
onBrokenLinks: "throw",
|
||||
onBrokenLinks: "log",
|
||||
onBrokenMarkdownLinks: "warn",
|
||||
favicon: "img/favicon.svg",
|
||||
customFields: {
|
||||
|
|
@ -119,7 +119,7 @@ const config = {
|
|||
title: "Community",
|
||||
items: [
|
||||
{
|
||||
label: "Github",
|
||||
label: "GitHub",
|
||||
href: "https://github.com/itplr-kosit/validator",
|
||||
},
|
||||
{
|
||||
|
|
@ -133,11 +133,11 @@ const config = {
|
|||
items: [
|
||||
{
|
||||
label: "KoSIT",
|
||||
href: "https://www.xoev.de",
|
||||
href: "https://xeinkauf.de",
|
||||
},
|
||||
{
|
||||
label: "XRechnung",
|
||||
href: "https://www.xoev.de/xrechnung-16828",
|
||||
href: "https://xeinkauf.de/xrechnung/",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
6
server/ui/package-lock.json
generated
6
server/ui/package-lock.json
generated
|
|
@ -18113,9 +18113,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/regexpu-core": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.3.0.tgz",
|
||||
"integrity": "sha512-ulzJYRb0qgR4t8eTgHeL7nnKL/4ul2yjnuTBEDIpYG7cSs8CcADE1q18RFFChXLP8WwRgPrHThGbYplvASdujw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.3.1.tgz",
|
||||
"integrity": "sha512-DzcswPr252wEr7Qz8AyAVbfyBDKLoYp6eRA1We2Fa9qirRFSdtkP5sHr3yglDKy2BbA0fd2T+j/CUSKes3FeVQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"regenerate": "^1.4.2",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import clsx from "clsx";
|
||||
import type { ButtonHTMLAttributes, DetailedHTMLProps, ReactNode } from "react";
|
||||
import type { ButtonHTMLAttributes, DetailedHTMLProps, JSX, ReactNode } from "react";
|
||||
import React from "react";
|
||||
import type { ExtendProps } from "../util/types";
|
||||
import styles from "./Button.module.css";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import React, { JSX, useEffect, useState } from "react";
|
||||
import type { PrismTheme, Language } from "prism-react-renderer";
|
||||
import Highlight, { defaultProps } from "prism-react-renderer";
|
||||
import { Highlight, themes } from "prism-react-renderer";
|
||||
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
||||
import clsx from "clsx";
|
||||
import downloadFile from "js-file-download";
|
||||
|
|
@ -63,7 +63,6 @@ function Codeblock({
|
|||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<Highlight
|
||||
{...defaultProps}
|
||||
code={children}
|
||||
language={language}
|
||||
theme={codeTheme}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable react/jsx-props-no-spreading */
|
||||
import React from "react";
|
||||
import React, { JSX } from "react";
|
||||
import clsx from "clsx";
|
||||
import type { DropEvent } from "react-dropzone";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ReactNode } from "react";
|
||||
import type { JSX, ReactNode } from "react";
|
||||
import React from "react";
|
||||
import Layout from "@theme/Layout";
|
||||
import styles from "./PageLayout.module.css";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import React, { JSX } from "react";
|
||||
import PageLayout from "@site/src/components/PageLayout";
|
||||
import XmlView from "@site/src/components/XmlView";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import React, { JSX } from "react";
|
||||
import PageLayout from "@site/src/components/PageLayout";
|
||||
import XmlView from "@site/src/components/XmlView";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import React, { JSX } from "react";
|
||||
import Upload from "../components/Upload";
|
||||
import PageLayout from "../components/PageLayout";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue