I have an OpenAPI hooked up to my Azure API manager. I have a valid OpenAPI json file that was generated by my Swagger API integration. I know it's valid because I have pasted into https://editor.swagger.io/ and it works fine without errors. However, if I try and paste it into my Azure API Manager in the Design ->Front End -> OpenApi Specification Editor and try to save it gives me a huge list of errors. Here is the start:
One or more fields contain incorrect values:
Parsing error(s): OpenAPI specification version '{ "openapi": "3.0.1", "info": { "title": "my api", "description": "desc", "contact": { "name": "my name", "email": "my email" }, "version": "1.0" }, "paths": { "/api/BuildInfo": { "get": { "tags": [ "BuildInfo" ], "summary": "my summary.", "parameters": [ { "name": "GateName", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "schema": { "type": "string", "default": "1.0" } } ], "responses": { "200": { "description": "The gate build info was successfully retrieved.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GateBuildInfoODataValue" } } } }, "404"
And the errors go on and on for pretty much the entirety of the file. Weird, if I use the Import-AzApiManagementApi powershell command (https://learn.microsoft.com/en-us/powershell/module/az.apimanagement/import-azapimanagementapi?view=azps-6.5.0) it works fine. And then if I go to the Azure UI it shows my new json and if I try to click save with no modifications it gives me the errors. As far as I can tell the Azure API Manager UI validation has a bug in it and thinks that valid OpenAPI json is invalid.