What is the difference between LogicApp.json and LogicApp.de



我在visual studio代码和visual code社区本地创建了相同的Logic应用程序。我发现两者都创建了不同的模板文件,即LogicApp。VS Community .json和VS Code. LogicApp.definition.json。是什么使这些模板文件彼此不同?

Json from VS Community (LogicApp.json):-

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"metadata": {
"description": "Name of the Logic App."
}
},
"logicAppLocation": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"allowedValues": [
"[resourceGroup().location]",
"eastasia",
"southeastasia",
"centralus",
"eastus",
"eastus2",
"westus",
"northcentralus",
"southcentralus",
"northeurope",
"westeurope",
"japanwest",
"japaneast",
"brazilsouth",
"australiaeast",
"australiasoutheast",
"southindia",
"centralindia",
"westindia",
"canadacentral",
"canadaeast",
"uksouth",
"ukwest",
"westcentralus",
"westus2",
"koreacentral",
"koreasouth",
"francecentral",
"francesouth",
"uaecentral",
"uaenorth",
"southafricanorth",
"southafricawest",
"switzerlandnorth",
"switzerlandwest",
"germanynorth",
"germanywestcentral",
"norwayeast",
"brazilsoutheast"
],
"metadata": {
"description": "Location of the Logic App."
}
}
},
"variables": {},
"resources": [
{
"name": "[parameters('logicAppName')]",
"type": "Microsoft.Logic/workflows",
"location": "[parameters('logicAppLocation')]",
"tags": {
"displayName": "LogicApp"
},
"apiVersion": "2016-06-01",
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Response": {
"type": "Response",
"kind": "http",
"inputs": {
"statusCode": 200,
"body": "hello user!"
},
"runAfter": {}
}
},
"parameters": {},
"triggers": {
"manual": {
"type": "Request",
"kind": "Http",
"inputs": {
"schema": {},
"method": "GET"
}
}
},
"contentVersion": "1.0.0.0",
"outputs": {}
},
"parameters": {}
}
}
],
"outputs": {}
}

来自VS Code的Json (LoginApp.definition.json):-

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workflows_logic_vscode_name": {
"defaultValue": "logic-vscode",
"type": "string"
}
},
"resources": [
{
"apiVersion": "2017-07-01",
"dependsOn": [],
"location": "eastus",
"name": "[parameters('workflows_logic_vscode_name')]",
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {
"Request": {
"type": "Request",
"kind": "Http",
"inputs": {
"method": "GET",
"schema": {}
}
}
},
"actions": {
"Response": {
"runAfter": {},
"type": "Response",
"inputs": {
"body": "Hello user",
"statusCode": 200
}
}
},
"outputs": {}
},
"parameters": {},
"state": "Enabled"
},
"scale": null,
"tags": {},
"type": "Microsoft.Logic/workflows"
}
],
"variables": {}
}

两者都是工作流定义,当你检查细节时,工作流看起来很相似,但格式不同。

在VS-Code/Visual Studio/Portal等环境中创建时,格式会有所不同。

下面是我们从Azure Portal创建它的样例定义:

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/XXXX-06-01/workflowdefinition.json#",
"actions": {},
"contentVersion": "X.0.0.0",
"outputs": {},
"triggers": {
"manual": {
"inputs": {},
"kind": "Http",
"type": "Request"
}
}
},
"kind": "Stateful"
}

从微软文档中查看VSCode和VisualStudio中创建逻辑应用程序的差异及其工作流程。

相关内容

  • 没有找到相关文章

最新更新