You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ This web service implements a **[Data Validation API](#API)** being specified as
13
13
-[From sources](#from-sources)
14
14
-[With Docker](#with-docker)
15
15
-[Configuration](#configuration)
16
+
-[Service settings](#service-settings)
16
17
-[Profiles](#profiles)
17
18
-[Checks](#checks)
18
19
-[API](#api)
@@ -33,7 +34,7 @@ Requires basic development toolchain (`sudo apt install build-essential`) and Py
33
34
34
35
1. clone repository: `git clone https://github.com/gbv/validation-api-ws.git && cd validation-api-ws`
35
36
2. run `make deps` to install dependencies
36
-
3. optionally [Configure](#configuration] the instance with
37
+
3. optionally [Configure](#configuration) the instance
37
38
3.`make start`
38
39
39
40
### Via Docker
@@ -44,7 +45,7 @@ A Docker image is automatically build [and published](https://github.com/orgs/gb
44
45
docker run --rm -p 7007:7007 ghcr.io/gbv/validation-api-ws:main
45
46
~~~
46
47
47
-
A [configuration] directory or file must exist and be mounted:
48
+
A [configuration](#configuration) directory or file must exist and be mounted:
48
49
49
50
~~~sh
50
51
test -f data/config.json && docker run --rm -p 7007:7007 --volume config:/app/config ghcr.io/gbv/validation-api-ws:main
@@ -53,7 +54,7 @@ test -f config.json && docker run --rm -p 7007:7007 --volume ./config.json:/app/
53
54
54
55
## Configuration
55
56
56
-
The [default configuration](config.default.json) contains some base formats. To defined the application profiles to be checked against, create a configuration file in JSON format at `config.json` in the current directory or in the local subdirectory `config`. It is also possible to pass the location of config file or directory with argument `--config` at startup. The configuration file must contain field `profiles` with a list of [profile objects](#profiles) and it can contain additional service settings.
57
+
The [default configuration](config.default.json) contains some base formats. To defined application profiles to be checked against, create a configuration file in JSON format at `config.json` in the current directory or in the local subdirectory `config`. It is also possible to pass the location of config file or directory with argument `--config` at startup. The configuration file must contain field `profiles` with a list of [profile objects](#profiles) and it can contain additional service settings.
57
58
58
59
### Service settings
59
60
@@ -95,9 +96,11 @@ Validate data against an application profile and return a list of errors in [Dat
95
96
-`url` to be downloaded from an URL (if the service is configured with `downloads` directory)
96
97
-`file` to be read from a local file in the stage directory of the server (if the service is configured with `stage` directory)
97
98
98
-
Status code is always 200 if validation could be executed, no matter whether errors have been found or not.
99
+
Status code is always 200 if validation could be executed, no matter whether errors have been found or not. For example validating the string `[1,2` at default profile `json` results in the following validation response. The error position (after the fourth character on line 1) is referenced with multiple dimensions. Dimension values are always strings.
99
100
100
-
For example validating the string `[1,2` at default profile `json` (`curl http://localhost:7007/json/validate -d '[1,2'`) results in the following validation response. The error position (after the fourth character on line 1) is referenced with multiple dimensions. Dimension values are always strings.
0 commit comments