Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add 'azd x validate-registry' command for extension registry validation #6896

Closed
Closed
feat: add 'azd x validate-registry' command for extension registry validation#6896

Description

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:

  1. Required fields: id, displayName, description, versions
  2. Valid capabilities: custom-commands, lifecycle-events, mcp-server, service-target-provider, framework-service-provider, metadata
  3. Semver version format: Strict regex /^\d+\.\d+\.\d+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$/
  4. Platform artifact structure: Valid os/arch combinations (windows/amd64, darwin/arm64, linux/amd64, etc.) with required url field
  5. Extension ID format: Dot-separated namespace (e.g. jongio.azd.app)
  6. 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

  • azd x validate-registry command accepts a local path or URL to a registry.json
  • Validates all fields currently checked by the Node.js script
  • Returns structured JSON output for CI integration (--json flag)
  • Exit code 0 on success, non-zero on validation failure
  • Update awesome-azd workflow to use azd x validate-registry instead of the Node.js script
  • Document the command in azd extension docs

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions