Web-item weight not allowing integers in connect json

Hi All,
I have added weight to one of the web-item in a Jira connect app, but while installing it throwing the following error: 'The App descriptor failed to validate against the schema. … /webItems/0/weight: instance type(number) does not match any allowed primitive type(allowed :[Integer]).
sample web-item configuration:
“webItems”: [
{
“key”: “bulk-clone-item”,
“url”: “/Bulk Example.html”,
“location”: “jira.navigator.pluggable.items”,
“weight”:30,
“name”: {
“value”: “Bulk Example”
},
“tooltip”: {
“value”: “Bulk Example”
},
“icon”: {
“url”: “/img/bulk-clone.svg”
},
“target”: {
“type”: “dialog”,
“options”: {
“height”: “1px”,
“width”: “1px”,
“chrome”: false
}
}
},

]

Refer to

attachment for more details.

1 Like

Hi @AshokChelimilla,

Does the descriptor validate when you remove the “weight”:30, line?

Regards,
Dugald

Thank you @dmorrow for your response.
Yes. If the “weight”:30, line removed it’s allowing to install App in Jira cloud instance.

Thanks,
Ashok

Hi @AshokChelimilla,

I can’t reproduce your issue. Are you sure the descriptor is well formed and there are no hidden/strange characters in it. Also, you can use https://atlassian-connect-validator.herokuapp.com/validate to edit and validate the descriptor.

Regards,
Dugald

Hi @dmorrow,

Please refer below Connect.json which verified in https://atlassian-connect-validator.herokuapp.com/validate but installation is failing by throwing the following error
error message:
he app descriptor failed to validate against the schema. Please confirm this app is intended for use with JIRA and then contact the app vendor.

  • /webItems/0/weight: instance type (number) does not match any allowed primitive type (allowed: [“integer”])

Connect-Atlassian.json:

{
  "key": "org.myapp",
  "name": "myapp for Jira",
  "baseUrl":"https://8dbd3631dae6.ngrok.io" ,
  "enableLicensing": false,
  "description": "Test Descriptor.",
  "vendor": {
    "name": "Bob Swift Atlassian Apps (an Appfire company)",
    "url": "https://test.atlassian.net/wiki"
  },
  "scopes": ["READ", "WRITE", "DELETE", "ACT_AS_USER", "ADMIN"],
  "authentication": {
    "type": "jwt"
  },
  "apiVersion": 1,
  "links": {
    "config": "https://8dbd3631dae6.ngrok.io/atlassian-connect.json"
  },
  "modules": {
    "webItems": [
      {
        "key": "test-clone-item",
        "url": "/test-clone.html",
        "location": "jira.navigator.pluggable.items",
        "weight": 30,
        "name": {
            "value": "test test Plus"
        },
        "icon": {
              "url": "/img/test-clone.svg"
              },
              "target": {
                "type": "dialog",
                "options": {
                  "height": "1px",
                  "width": "1px",
                  "chrome": false
                }
              }
      }
    ]
  }
}

Note: Same connect JSON file is allowing to install after removing “weight”: 30, from it.

Regards,
Ashok

Hi @AshokChelimilla,

I’ve created a simple public app to try to reproduce this. The descriptor is https://dugaldmorrow.github.io/webitem-with-weight/jira-connect-descriptor.json. Can you try installing this to see if it works for you like it does for me.

Regards,
Dugald