[GH-ISSUE #689] feat(metadata): add metadata validate with strict schema and limits #189

Closed
opened 2026-02-26 21:33:56 +03:00 by kerem · 0 comments
Owner

Originally created by @rudrankriyam on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/689

Parent

Summary

Implement asc metadata validate for offline validation of local metadata files before running any mutation.

Proposed CLI

asc metadata validate --dir "./metadata"

Scope

  • Add metadata validate subcommand.
  • Validate canonical metadata layout and schema.
  • Reject unknown keys (usage error, exit 2).
  • Validate required fields and character limits for supported metadata fields.
  • Emit structured validation report (errors, warnings, affected files/locales).

Detailed Tasks

  • Add metadata validate command wiring + help docs.
  • Traverse canonical metadata directories and decode strictly.
  • Validate field-level constraints against ASC-known limits.
  • Differentiate usage/config errors from content validation failures.
  • Emit deterministic JSON/table/markdown reports.

Test Plan (TDD)

  • Cmdtest: invalid schema returns usage error (exit 2) with stderr assertions.
  • Cmdtest: valid metadata exits cleanly and reports no errors.
  • Cmdtest: missing required fields are reported with stable identifiers.
  • Unit: boundary tests for each supported length-constrained field.
  • Unit: unknown-key detection includes exact key names in deterministic order.

Acceptance Criteria

  • asc metadata validate exists and is self-documenting.
  • Unknown keys are never silently ignored.
  • Validation report is deterministic and CI-friendly.
  • Exit behavior is documented and tested.

Out of Scope

  • Remote API reads/writes; this command remains offline.
Originally created by @rudrankriyam on GitHub (Feb 20, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/689 ## Parent - #587 - Depends on #687 ## Summary Implement `asc metadata validate` for offline validation of local metadata files before running any mutation. ## Proposed CLI ```bash asc metadata validate --dir "./metadata" ``` ## Scope - Add `metadata validate` subcommand. - Validate canonical metadata layout and schema. - Reject unknown keys (usage error, exit `2`). - Validate required fields and character limits for supported metadata fields. - Emit structured validation report (errors, warnings, affected files/locales). ## Detailed Tasks - [ ] Add `metadata validate` command wiring + help docs. - [ ] Traverse canonical metadata directories and decode strictly. - [ ] Validate field-level constraints against ASC-known limits. - [ ] Differentiate usage/config errors from content validation failures. - [ ] Emit deterministic JSON/table/markdown reports. ## Test Plan (TDD) - [ ] Cmdtest: invalid schema returns usage error (exit `2`) with stderr assertions. - [ ] Cmdtest: valid metadata exits cleanly and reports no errors. - [ ] Cmdtest: missing required fields are reported with stable identifiers. - [ ] Unit: boundary tests for each supported length-constrained field. - [ ] Unit: unknown-key detection includes exact key names in deterministic order. ## Acceptance Criteria - [ ] `asc metadata validate` exists and is self-documenting. - [ ] Unknown keys are never silently ignored. - [ ] Validation report is deterministic and CI-friendly. - [ ] Exit behavior is documented and tested. ## Out of Scope - Remote API reads/writes; this command remains offline.
kerem 2026-02-26 21:33:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#189
No description provided.