diff --git a/src/registry.py b/src/registry.py index 9e3e0c1..84a714b 100644 --- a/src/registry.py +++ b/src/registry.py @@ -195,6 +195,8 @@ def get_index(self, allowed_media_type: Optional[list[str]] = None): try: self._check_200_response(response) index = response.json() + # Ensure mediaType is set for existing indices + index["mediaType"] = "application/vnd.oci.image.index.v1+json" return index except ValueError: diff --git a/src/schemas.py b/src/schemas.py index dcb5624..b6306af 100644 --- a/src/schemas.py +++ b/src/schemas.py @@ -33,6 +33,7 @@ "required": [ "schemaVersion", "manifests", + "mediaType", ], "properties": indexProperties, "additionalProperties": True,