diff --git a/.cursor/skills/asset-registry-endpoints/SKILL.md b/.cursor/skills/asset-registry-endpoints/SKILL.md index 3aca5d2..c01b3b8 100644 --- a/.cursor/skills/asset-registry-endpoints/SKILL.md +++ b/.cursor/skills/asset-registry-endpoints/SKILL.md @@ -72,9 +72,12 @@ export_/ ### Importing packages ```bash -$CLI config import -d --overwrite +$CLI config import -d --validate --overwrite ``` +- `--validate` — performs schema validations before importing. If there are + validation errors the import is **not** performed and the errors are returned. + If there are no errors, the package and its assets are imported normally. - `--overwrite` — required when updating an existing package - Without `--overwrite` — creates a **new** package (use for first-time import) @@ -279,8 +282,8 @@ $CLI config export --packageKeys --unzip # — configuration root must conform to the schema from step 2 # — set spaceId to the package's space (ask the user) -# 5. Import back (--overwrite for existing package, omit for new) -$CLI config import -d --overwrite +# 5. Validate and import (--overwrite for existing package, omit for new) +$CLI config import -d --validate --overwrite ``` ## Quick reference diff --git a/docs/user-guide/agentic-development-guide.md b/docs/user-guide/agentic-development-guide.md index 97b68ac..9078af6 100644 --- a/docs/user-guide/agentic-development-guide.md +++ b/docs/user-guide/agentic-development-guide.md @@ -68,13 +68,15 @@ Add a new JSON file in the `nodes/` directory: Set `schemaVersion` to the value from the asset descriptor's `assetSchema.version` field (returned by `asset-registry get`). The `spaceId` is required — omitting it causes import errors. -### 5. Import +### 5. Validate and import ```bash -content-cli config import -d --overwrite +content-cli config import -d --validate --overwrite ``` -This creates a new version in staging (not deployed). To create a brand-new package instead of updating, omit `--overwrite`. +The `--validate` option performs schema validations for the assets. If there are no schema validations, then the package and its assets are imported. Otherwise, the validation errors are returned and the package import isn't performed. + +This creates a new version in staging (not deployed) if there are no schema validation errors. To create a brand-new package instead of updating, omit `--overwrite`. To later export a staging version, use `--keysByVersion`: