Azure存储REST API响应包括XML文件开头的BOM(ï;»;¿;”;)
我正在为一个发布任务开发一个定制的vsts扩展,该任务有一个选择列表,其中包含从REST端点数据源(我的存储帐户)填充的值。我下面这个blow链接作为参考。 我已上载扩展名,但任务中的值未填充选取列表 下面是我所做的配置。 vss-extension.json:Azure存储REST API响应包括XML文件开头的BOM(ï;»;¿;”;),azure,azure-storage,azure-devops-extensions,Azure,Azure Storage,Azure Devops Extensions,我正在为一个发布任务开发一个定制的vsts扩展,该任务有一个选择列表,其中包含从REST端点数据源(我的存储帐户)填充的值。我下面这个blow链接作为参考。 我已上载扩展名,但任务中的值未填充选取列表 下面是我所做的配置。 vss-extension.json: { “manifestVersion”: 1, “id”: “build-release-task”, “name”: “My Custom release task”, “version”: “0.0.1”,
{
“manifestVersion”: 1,
“id”: “build-release-task”,
“name”: “My Custom release task”,
“version”: “0.0.1”,
“publisher”: “custext”,
“public”: false,
“targets”: [
{
“id”: “Microsoft.VisualStudio.Services”
}
],
“description”: “A picklist which has values populated from the REST
endpoint data source. Includes one build/release task.”,
“categories”: [
“Build and release”
],
“icons”: {
“default”: “images/extension-icon.png”
},
“files”: [
{
“path”: “buildAndReleaseTask”
}
],
“contributions”: [
{
“id”: “service-endpoint”,
“description”: “Service Endpoint type for custom Storage connection”,
“type”: “ms.vss-endpoint.service-endpoint-type”,
“targets”: [ “ms.vss-endpoint.endpoint-types” ],
“properties”: {
“name”: “custom”,
“displayName”: “Custom server connection”,
“url”: {
“displayName”: “Server Url”,
“helpText”: “storage end point url.”
},
“dataSources”: [
{
“name”: “Storage Account”,
“endpointUrl”: “{{endpoint.url}}test/?restype=container&comp=list”,
“resultSelector”: “xpath://EnumerationResults/Blobs/Blob/Name”
}
],
]
}
],
“helpMarkDown”: “Learn More”
}
},
{
“id”: “custom-build-release-task”,
“type”: “ms.vss-distributed-task.task”,
“description”: “Task with a dynamic property getting data from an
endpoint REST data source”,
“targets”: [
“ms.vss-distributed-task.tasks”
],
“properties”: {
“name”: “buildAndReleaseTask”
}
}
]
}
task.json:
{
“id”: “325958a0-63b7-11e6-88a5-f7c7f66e6264”,
“name”: “dropdownlist”,
“friendlyName”: “Drop down list”,
“description”: “Lists the db files”,
“helpMarkDown”: “Custom release task.Drop down list”,
“category”: “Utility”,
“visibility”: [
“Release”
],
“author”: “satyam”,
“version”: {
“Major”: 0,
“Minor”: 1,
“Patch”: 0
},
“instanceNameFormat”: “dropdownlist $(message)”,
“groups”: [
{
“name”: “advanced”,
“displayName”: “Advanced”,
“isExpanded”: false
}
],
“inputs”: [
{
“name”: “CustomService”,
“type”: “connectedService:custom”,
“label”: “Storage end point”,
“defaultValue”: “”,
“required”: true,
“helpMarkDown”: “Select the storage account to use. If needed,
click on ‘manage’, and add a new Service Endpoint of type
‘Custom server connection'”
},
{
“name”: “Scripts”,
“type”: “pickList”,
“label”: “saasscripts”,
“required”: true,
“helpMarkDown”: “Select the name of the saas script.”,
“properties”: {
“EditableOptions”: “True”
}
}
],
“dataSourceBindings”: [
{
“target”: “Scripts”,
“endpointId”: “$(CustomService)”,
“dataSourceName”: “Storage Account”
}
],
“outputVariables”: [
{
“name”: “dbfile”,
“description”: “Application URL of the selected App
Service.”
}
],
“execution”: {
“Node”: {
“target”: “powershell.js”
}
}
}
endpointUrl:我在数据源的endpointUrl中尝试了以下方法(vss extension.json)
是否有任何方法或解决方法可以将azure blob rest api响应更改为排除BOM(ï»?)或将响应更改为JSON格式。我也了解到了这一点,您是否找到了发生这种情况的原因或强制其发送有效xml的方法?