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
To also run business-layer rules (PQL parsing, data-model availability, KPI uniqueness, …), run `config validate` against the just-imported staging version:
92
+
93
+
```bash
94
+
content-cli config validate --packageKey <package-key> --layers SCHEMA BUSINESS
95
+
```
96
+
91
97
If validation returns errors, fix the issues before importing.
`config import --validate` runs the **SCHEMA** layer only. It does **not** run BUSINESS-layer checks (PQL parsing, data-model availability, KPI uniqueness, etc.). To run business validation, use [`config validate`](#validate-package-configurations) after the import.
179
+
180
+
## Validate Package Configurations
181
+
182
+
The `config validate` command validates the **staging (draft) version** of a package by sending its nodes through one or more validation layers. The command runs against the Pacman validate API and returns a structured report of errors, warnings, and info findings.
183
+
184
+
This command requires **edit permission** on the target package (see [Permissions](#permissions)).
By default, only the `SCHEMA` layer is run. The console output looks like:
191
+
192
+
```bash
193
+
info: Validation result: VALID
194
+
info: Errors: 0 | Warnings: 0 | Info: 0
195
+
```
196
+
197
+
If there are findings, each one is printed on its own line with the severity, node key, asset type, message, and code:
198
+
199
+
```bash
200
+
info: Validation result: INVALID
201
+
info: Errors: 1 | Warnings: 0 | Info: 0
202
+
info:
203
+
info: ERROR my-knowledge-model (SEMANTIC_MODEL) - $.requiredField: is missing but it is required [REQUIRED_PROPERTY_MISSING]
204
+
```
205
+
206
+
### Validation Layers
207
+
208
+
The `--layers` option selects which validation layers to run. Multiple layers can be passed and are executed in a single request; their findings are merged into one report.
209
+
210
+
| Layer | What it checks | Owner |
211
+
|---|---|---|
212
+
|`SCHEMA`| Asset-schema conformance of each node's `configuration` field — required properties, enum values, type checks, conditional schemas. | Asset registry |
213
+
|`BUSINESS`| Asset-type-specific business rules — for `SEMANTIC_MODEL`, e.g. PQL parsing, data-model availability, KPI uniqueness. Rules live in the owning asset service. | Owning asset service (e.g. `cloud-semantic-layer` for Knowledge Models) |
214
+
215
+
Currently `SCHEMA` and `BUSINESS` are the only layers accepted by the Pacman API. Other values are rejected with a `400 layers.unsupported` error.
216
+
217
+
To run both layers:
218
+
219
+
```bash
220
+
content-cli config validate --packageKey <packageKey> --layers SCHEMA BUSINESS
221
+
```
222
+
223
+
### Validate Specific Nodes
224
+
225
+
By default, every node in the package's staging version is validated. To restrict the scope to a subset of nodes, use `--nodeKeys`:
0 commit comments