Atlassian Connect Macro parameter variables in url not working

I have the following staticContentMacro defined in the atlassian-connect.json:

{
        "renderingMethod": "get",
        "url": "/items/{collection}",
        "parameters": [
          {
            "identifier": "collection",
            "name": {
              "value": "Collection"
            },
            "description": {
              "value": "The collection"
            },
            "type": "string",
            "required": true,
            "multiple": false,
            "hidden": false
          }
       ]
}

This should be possible according to the documentation: Macro Input Parameter (atlassian.com)

However, the collection paramters is not inserted into the request and the {collection} placeholder is removed.

According to another section in the documentation in (Context parameters), variables in urls are not available for macros:

URL variables are available to any of the page modules, including web panels, web items, general pages and dialog pages, except for Confluence macros.

So how should parameters of macros then be used if not in the URL?

Dear Jonas,

I never tried putting a macro parameter into the path. Putting it into a query parameter should work based on my experience.

Best wishes

Andreas

Hi Andreas,

Thank you very much for your response.
I tried to use it as a query parameter, but this resulted in the same problem.
The generated request is then items?collection=

I wonder if it’s a privacy / security related issue.
Other context parameters e.g. page.title, macro.id etc. are also not working.
Is there a setting to enable these?

Dear Jonas,

Can you paste the entire static macro description? Your code snippet misses some items like key, name etc.

To get an idea you can check e.g. https://bitbucket.org/apurde/simple-cite-cloud/raw/ae4eb121a6bdae66738d4551ea2a8de3114d5be7/src/main/resources/atlassian-connect.json

Andreas