How to add multiple search_provider

Hi everyone,

I’m building a small add-on to quickly search on Jira some issues.

    "search_provider": {
    "name": "JIRA",
    "search_url": "https://atlassian.net/jira/search?searchString={searchTerms}",
    "keyword": "jira",
    "favicon_url": "/icons/favicon.ico",
    "is_default": false,
    "encoding": "UTF-8"
  }

For now I have something like that, and it’s working. But I want to do more, I want to have another keyword : ‘Bug’ that allow me to have a different search_url.

Is it possible to have something like

    search_provider" : [ {
        ...
       "keyword" : "jira",
       ...
    },
    {
       ...
       "keyword" : " bug",
       ...
    }] 

Or is it impossible and I’ll have to make two different add-ons ?

Thanks,
Paul

The "search_provider" key expects an object, not an array. As you suspected, you’ll have to use multiple extensions to declare multiple search providers.