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
When creating or modifying service declarations, it's important to verify they work as expected. Let's see how to test your declarations in different ways.
9
+
10
+
## Full testing
11
+
12
+
To test your declarations by actually fetching the documents and validating the entire process:
13
+
14
+
```sh
15
+
npx ota validate declarations
16
+
```
17
+
18
+
It is also possible to test a single service declaration:
19
+
20
+
```sh
21
+
npx ota validate declarations --services "<service-name>"
22
+
```
23
+
24
+
Even a single terms of a service can be tested:
25
+
26
+
```sh
27
+
npx ota validate declarations --services "<service-name>" --terms "<terms-type>"
28
+
```
29
+
30
+
## Schema validation only
31
+
32
+
For quicker validation that only checks the declaration structure without fetching any documents:
33
+
34
+
```sh
35
+
npx ota validate declarations --schema-only
36
+
```
37
+
38
+
This is useful during initial development to ensure your JSON structure is correct before testing the actual document fetching.
39
+
40
+
Same options as for the full test are available.
41
+
42
+
## Linting declarations
43
+
44
+
To ensure consistency across all declarations, you should also run the linter:
45
+
46
+
```sh
47
+
npx ota lint
48
+
```
49
+
50
+
Same options as for the full test are available.
51
+
52
+
To automatically fix linting errors:
53
+
54
+
```sh
55
+
npx ota lint --fix
56
+
```
57
+
58
+
This will format your declaration files according to the project's standards.
0 commit comments