Skip to content

Expose mediaType in ContentDescriptorTemplate #4498

Open

Description

@Sboti03

Description

BuildableManifestTemplate.ContentDescriptorTemplate contains a mediaType
field that is parsed from JSON, but it is not exposed via a public getter.

At the same time, other descriptor fields such as digest, size, urls,
and annotations are accessible through public methods.

Problem

This makes it difficult to work with descriptor media types without using
reflection, especially when dealing with OCI artifacts.

Use case

When processing OCI manifests, it is often necessary to inspect layer
descriptors and select layers based on their media type.

For example, when working with Helm charts stored as OCI artifacts, the layer
can be identified via: application/vnd.cncf.helm.chart.content.v1.tar+gzip

Without a getter, accessing this requires reflection on internal fields.

Activity

  1. whowes commented on Sep 22, 2026

    @whowes
    Contributor

    If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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