Skip to content

Item "Extension" type. #86

Open
Open

Description

@NfNitLoop

Add a freeform "extensions" field in the Item type so that third-party apps can add additional (meta)data to Items in an easily discoverable way.


There's nothing stopping someone from shoving more data into an Item as it is, since protobuf if designed to ignore fields it doesn't (yet) know about. But leaving it up to folks to choose how to do that will possibly lead to collisions, and also make it hard to discover how to parse the embedded data.

I'm thinking something like this:

message Item {
    // ...

    // A place for third-party clients to add any additional metadata they wish.
    // the string key is the name of your extension.
    // Ex: if you have a client called "Foo" and a feature called "Bar Baz", use the format:
    // "foo:bar-baz"
    // Or, you could just use an extension name for your client ("foo") and map 
    // its various values to message properties inside of that object:  
    map <string, AnyMessage> extensions = // ...
}

message AnyMessage {
    // This space left blank. You may specify any fields you wish in your extension.
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions