fix: clean up mediaType-to-type rename fallout (ADR 0014/0015)#73
Merged
Merged
Conversation
- Remove duplicate 'type' member from the Attestation CDDL and the data-model diagram (leftover of the removed 'mediaType' field) - Restore 'mediaType' field names in the OCI Image Index example, which OCI requires; the rename does not apply to OCI JSON - Migrate specification/examples/ai-catalog.json to the 'type' field and urn:air identifiers per ADR 0014 and ADR 0015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #66
The
mediaType->typerename (ADR 0014) was applied mechanically in a few places it should not have been, and skipped one place it should have reached. This PR cleans up all three:1. Duplicate
typemember in the Attestation schemaADR 0014 removed
mediaTypefrom the Attestation object, but it was renamed totypeinstead of deleted, leaving the CDDL with a duplicate map key (invalid CDDL). The mermaid diagram in "Data Model Overview" had the same duplicate. Both now declaretypeonce.2. OCI Image Index example restored to
mediaTypeThe example in "Mapping to OCI Distribution > OCI Image Index Example" used
"type"on the index and manifest descriptors. The OCI image spec requires the field namemediaType, so the example was not valid OCI. The rename does not apply to third-party OCI JSON; restoredmediaTypein the three descriptor positions (artifactTypefields untouched).3.
specification/examples/ai-catalog.jsonmigratedThe standalone example file still used
mediaType, so its entries were missing the requiredtypemember and did not validate against the spec's own CDDL. Migrated totype, and updated the identifiers from the pre-ADR-0015urn:example:...style to the standardizedurn:air:{publisher}:{namespace}:{name}form (with the host identifier aligned to thedid:web:style used in the spec's other examples).Verification
uv run --locked python tools/build_spec.py specification/ai-catalog.md ... --config specification/respec-config.jsonbuilds cleanlyspecification/examples/ai-catalog.jsonparses as valid JSON and now conforms to the CatalogEntry CDDL (hasidentifier,type, and exactly one ofurl/data)