microsoft / vscode-apimanagement

VS Code extension for Azure API Management.
MIT License
60 stars 39 forks source link

API Extractor Produces Invalid Template #257

Open karlrissland opened 2 years ago

karlrissland commented 2 years ago

Two issues Taking a stab at the parameters to redeploy an extracted api leads me to an invalid template error; {'code': 'InvalidTemplate', 'target': '/subscriptions/412b86d9-242b-452c-8273-a4da78837adc/resourceGroups/APIM/providers/Microsoft.Resources/deployments/apisTemplate', 'message': 'Deployment template validation failed: \'The template resource \'KarlRissApim/odatatest/GetWeatherForecast\' at line \'54\' and column \'5\' is not valid: The language expression \'\r\n {\r\n "date": "string",\r\n "temperatureC": 0,\r\n "temperatureF": 0,\r\n "summary": "string"\r\n }\r\n\' is not valid: the string character \'{\' at position \'4\' is not expected.. Please see https://aka.ms/arm-template-expressions for usage details.\'.', 'additionalInfo': [{'type': 'TemplateViolation', 'info': {'lineNumber': 54, 'linePosition': 5, 'path': 'resources[2]'}}]}

Seems to point to this code in the ...-api.template.json image

Also, suggestion, have an example showing how to redeploy the extracted template.