Summary
Move the extension registry validation logic from the standalone Node.js script in awesome-azd into the azd x extension itself (e.g. azd x validate-registry). This would make validation reusable outside of the GitHub Actions workflow and keep the source of truth for valid capabilities, platforms, and semver rules in one place.
Context
PR Azure/awesome-azd#749 adds azd extension integration into the awesome-azd gallery, including an automated submission workflow. As part of that workflow, a standalone Node.js validation script validates extension registry.json files before they're added to the gallery.
@wbreza suggested that these checks should be built directly into the azd x extension so they can be invoked from the workflow and by extension authors locally.
Current Validation Logic (to migrate)
The script currently validates:
- Required fields:
id, displayName, description, versions
- Valid capabilities:
custom-commands, lifecycle-events, mcp-server, service-target-provider, framework-service-provider, metadata
- Semver version format: Strict regex
/^\d+\.\d+\.\d+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$/
- Platform artifact structure: Valid
os/arch combinations (windows/amd64, darwin/arm64, linux/amd64, etc.) with required url field
- Extension ID format: Dot-separated namespace (e.g.
jongio.azd.app)
- Version ordering: Ensures latest stable version is selected correctly (stable > pre-release)
Proposed CLI Integration
# Validate a local registry.json
azd x validate-registry ./registry.json
# Validate a remote registry.json by URL
azd x validate-registry https://raw.githubusercontent.com/jongio/azd-app/main/registry.json
# Could also be used in CI/CD
azd x validate-registry $REGISTRY_URL --json --strict
Benefits
- Single source of truth: Capabilities, platforms, and validation rules defined once in the CLI
- Local validation: Extension authors can validate before submitting
- Workflow integration: awesome-azd workflow calls
azd x validate-registry instead of maintaining a separate script
- Consistency: Same validation in CLI and gallery submission
- Extensibility: Easy to add new checks (e.g. artifact URL reachability, signature verification)
Acceptance Criteria
Related
Summary
Move the extension registry validation logic from the standalone Node.js script in awesome-azd into the
azd xextension itself (e.g.azd x validate-registry). This would make validation reusable outside of the GitHub Actions workflow and keep the source of truth for valid capabilities, platforms, and semver rules in one place.Context
PR Azure/awesome-azd#749 adds azd extension integration into the awesome-azd gallery, including an automated submission workflow. As part of that workflow, a standalone Node.js validation script validates extension
registry.jsonfiles before they're added to the gallery.@wbreza suggested that these checks should be built directly into the
azd xextension so they can be invoked from the workflow and by extension authors locally.Current Validation Logic (to migrate)
The script currently validates:
id,displayName,description,versionscustom-commands,lifecycle-events,mcp-server,service-target-provider,framework-service-provider,metadata/^\d+\.\d+\.\d+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$/os/archcombinations (windows/amd64,darwin/arm64,linux/amd64, etc.) with requiredurlfieldjongio.azd.app)Proposed CLI Integration
Benefits
azd x validate-registryinstead of maintaining a separate scriptAcceptance Criteria
azd x validate-registrycommand accepts a local path or URL to aregistry.json--jsonflag)azd x validate-registryinstead of the Node.js scriptRelated