vscode-apimanagement icon indicating copy to clipboard operation
vscode-apimanagement copied to clipboard

API Extractor Produces Invalid Template

Open karlrissland opened this issue 2 years ago • 0 comments

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.

karlrissland avatar Aug 17 '22 20:08 karlrissland