创建自定义扩展时,如何按字母顺序对API结果进行排序

时间:2019-08-22 17:19:58

标签: api azure-devops

在我的task.json中,我在这样的选择列表中显示区域路径:

        "Inputs":[
    {
        "name": "bugAreaPathChildren2Dropdown",
        "type": "picklist",
        "label": "Area Path Children 2 Dropdown",
        "defaultValue": "",
        "required": false,
        "helpMarkDown": "Area path where bugs should be created",
        "visibleRule": "createBugsChecked = true"
    }
  ]

    "sourceDefinitions": [
      {
          "target": "bugAreaPathDropdown",
          "endpoint": "/$(system.teamProject)/_apis/wit/classificationnodes/areas?api-version=5.0",
          "selector": "jsonpath:$.name",
          "keySelector": "jsonpath:$.id",
              "authKey": "tfs:teamfoundation"
      },
      {
        "target": "bugAreaPathChildrenDropdown",
        "endpoint": "/$(system.teamProject)/_apis/wit/classificationnodes/areas?$depth=2&api-version=5.0",
        "selector": "jsonpath:$.children[*].name",
        "keySelector": "jsonpath:$.children[*].name",
            "authKey": "tfs:teamfoundation"
    }
]

问题是我的结果没有特定的顺序。我该如何订购?谢谢您的帮助 enter image description here

0 个答案:

没有答案