Page MenuHomePhabricator

Replace the "ContentHandlers" key in extension.json with more granular content definitions
Open, Needs TriagePublic

Description

One way of letting extensions register custom ContentStores (T209044) could be to use an extension.json config key. While thinking about that, I realized that perhaps, instead of a "ContentHandlers" key, there should be a single key where extensions can define new contents, which would include defining a ContentHandler, a ContentStore, etc. Some of these fields could be optional, and more fields can be added in the future.

I was also thinking about a more long-term idea of having an extension.json entry for defining new content types that would allow you to register ContentHandlers, ContentStores and any other thing we may want to add in the future. Something like:

"Contents": {
    "MyContent": {
        handler: "MyContentHandler",
        store: "MyContentStore",
        blobprefix: "my-prefix",
        // More things could be added here in the future
    }
}