Skip to content

SP-45: Add asset-registry validate command#342

Open
Zgjim Haziri (ZgjimHaziri) wants to merge 1 commit intomainfrom
SP-45-add-asset-registry-validate-command
Open

SP-45: Add asset-registry validate command#342
Zgjim Haziri (ZgjimHaziri) wants to merge 1 commit intomainfrom
SP-45-add-asset-registry-validate-command

Conversation

@ZgjimHaziri
Copy link
Copy Markdown
Contributor

@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) commented Apr 17, 2026

Summary

Add asset-registry validate command with three mutually exclusive modes for validating asset configurations:

  • --configuration/-c with --packageKey: validate a configuration JSON before import (CLI builds the ValidateRequest envelope)
  • --nodeKey with --packageKey: validate an already-stored node on the platform
  • -f: provide a file with the full ValidateRequest body (standalone alternative to all other options)

Proxies to Pacman's POST /core/asset-registry/validate/{assetType} endpoint.

Ticket: SP-45
Depends on: #341

Test plan

  • 18 unit tests covering all three modes, mutual exclusivity errors, JSON parse errors, and missing required options
  • All 36 asset-registry tests pass locally
  • content-cli asset-registry validate --help output verified

@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) requested a review from a team as a code owner April 17, 2026 13:31
@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) force-pushed the SP-45-add-asset-registry-validate-command branch from 2f8aaaf to 8378d01 Compare April 17, 2026 13:34
Base automatically changed from SP-39-add-asset-registry-proxy-commands to main April 17, 2026 13:35
Three mutually exclusive modes:
- --configuration/-c: validate a configuration JSON before import
- --nodeKey: validate an already-stored node on the platform
- -f: provide a full ValidateRequest file (multi-node/advanced)

The CLI assembles the ValidateRequest envelope in the first two modes.
Update SKILL.md, agentic guide, and command docs.

Includes-AI-Code: true
Made-with: Cursor
@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) force-pushed the SP-45-add-asset-registry-validate-command branch from 8378d01 to a90cb3e Compare April 17, 2026 14:39
@sonarqubecloud
Copy link
Copy Markdown

Comment on lines +112 to +113
- `--configuration <configuration>` – Inline JSON of the configuration to validate before import
- `-c, --configFile <configFile>` – Path to a JSON file containing the configuration to validate before import
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the short hand looks very confusing considering we have both --configuration and --configFile. I would just remove it here and leave no short hand


```
content-cli asset-registry validate --assetType BOARD_V2 \
--packageKey my-pkg --configuration '{"components":[{"type":"kpi"}]}'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason for enabling configuration passing directly instead of using a file? I expect this to be very unusable even for an agent to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants