opencontainers / distribution-spec

OCI Distribution Specification
https://opencontainers.org
Apache License 2.0
828 stars 205 forks source link

Clarification on Extension Discover API #329

Closed akashsinghal closed 2 years ago

akashsinghal commented 2 years ago

The OCI extension spec for discovery support defines a description field in the response. Currently it defines the description field as "Human readable description of this endpoint". However, the response can contain multiple endpoints. If there are multiple extension endpoints that each have different functionality, how should the description field be populated?

Sample: An extension namespace distribution enabled at the repository level. It has two endpoints _distribution/registry/manifests: provides a list of manifests digest for a repository _distribution/registry/taghistory: provides a list of manifest digests associated with a tag

In this case the sample discover response would be:

200 OK
Content-Length: <length>
Content-Type: application/json

{
    "extensions": [
        {
            "name": "_distribution",
            "description": "<insert what description should be>",
            "url": "https://<some url with taghistory info>",
            "endpoints": [
                  "_distribution/registry/manifests",
                  "_distribution/registry/taghistory"
            ]
        }
    ]    
}

Since there are multiple endpoints with different functionality what would the description field contain? Is the description field populated based on the endpoints returned in the response or is it supposed to be a namespace generic description?

akashsinghal commented 2 years ago

Discussed issue with @stevvooe offline. The description should completely define the functionality of each endpoint. So if there are multiple endpoints each with different functionality, then the description should separately describe each endpoint. Closing issue for now.