Giter Site home page Giter Site logo

Comments (5)

adityasaky avatar adityasaky commented on August 19, 2024

Something like the Docker/OCI alternative mentioned seems reasonable to me instead of just application/json. One thing, and I may be misunderstanding this, is that OCI seems to exhaustively list their media types. Will enforcement of "more information than just application/json" become an issue with something like the signing-spec which anyone can use, and therefore define a media type for?

If the URI requirement is dropped to a SHOULD, would implementations be expected to also support media type alternatives? Especially if the spec lists them as an alternative?

from dsse.

MarkLodato avatar MarkLodato commented on August 19, 2024

I'm thinking that we'd say something like:

payloadType is an opaque, case-sensitive string that uniquely and unambiguously identifies how to interpret payload. This includes both the encoding (JSON, CBOR, etc.) as well as the meaning/schema. To prevent collisions, it SHOULD be either:

  • (recommended) A case-normalized URI. Example: https://in-toto.io/Statement/v1-json
  • A lowercase Media Type (a.k.a. MIME type or Content Type). Example: application/vnd.in-toto.statement.v1+json.
    • IMPORTANT: If Media Type is used, it SHOULD NOT be a generic one that only represents encoding but not schema. For example, application/json is almost always WRONG. Instead, invent a media type specific for your application in the application/vnd namespace.

from dsse.

mnm678 avatar mnm678 commented on August 19, 2024

I like the option to use media type. This would also allow for future use within OCI without any major changes.

from dsse.

adityasaky avatar adityasaky commented on August 19, 2024

I'm thinking that we'd say something like:

Thanks @MarkLodato. This seems reasonable to me.

from dsse.

MarkLodato avatar MarkLodato commented on August 19, 2024

Thanks! Sent out pull request #26 to implement.

from dsse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.