Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

api.json symbolKey pack validation

Platform spec ADR

api.json symbolKey pack validation

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Registry ingestion already validates graph navigation (parentId, refItemId, package-relative paths). With registry-backed symbolKey on v4 rows, pack-time validation must catch malformed or duplicated keys before artifacts reach the docs UI.

validate_packed_api_doc must run validate_symbol_keys for schemaVersion >= 4 graph artifacts. When symbolKey is present on an item:

CheckRule
Non-emptyReject blank strings
Package prefixMust contain :: (package-prefixed canonical form)
UniquenessReject duplicate symbolKey values across items
Leaf consistencyLenient check: obvious mismatch between symbolKey leaf segment and qualifiedName leaf may reject when unambiguous

Absence of symbolKey on any row remains valid (backward compatibility with pre-registry emitters).

  • Implementation: compiler/crates/beskid_pckg/src/api_doc.rs
  • Operators re-pack with a current beskid doc / CLI to populate keys on new publishes; old .bpk files without keys still ingest.
  • compiler/crates/beskid_pckg/src/api_doc.rs unit tests (accept distinct keys, reject duplicate / malformed, accept omitted field)