question

JaimeHuffman-3696 avatar image
0 Votes"
JaimeHuffman-3696 asked JaimeHuffman-3696 commented

Azure API Manager OpenApiSpecification parser claims errors where there are none

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://docs.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.

azure-api-management
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JaimeHuffman-3696 Apology for the inconvenience with this issue. Is it possible to share your open API JSON or share the sample JSON reproducing the issue which does work with Import-AzApiManagementApi whereas fails while importing from Azure portal so I can validate and engage my team to assist us further. Please respond only to my private comment.

0 Votes 0 ·

I am seeing the same error starting yesterday. Clicking "Save" without changing anything shows the Parsing error(s)... message. Stranger still is that other team members do not have this problem.

0 Votes 0 ·

We have exactly the same issue. For us it works when you create a new API with an OpenAPI spec, but not when you want to edit it with the OpenApi Specification Editor. Even when you open an existing API and goes to Design ->Front End -> OpenApi Specification Editor and just saves it with no changes made, it complains.

0 Votes 0 ·

I'm experiencing what seems to be the same error.

One or more fields contain incorrect values:

Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specification

Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specification https://github.com/OAI/OpenAPI-
Specification/blob/master/versions/3.0.1.md (schema https://github.com/OAI/OpenAPI- Specification/blob/master/schemas/v3.0/schema.yaml).

I receive this error when attempting to replace the existing OpenAPI specification. However, I also get this error when saving the already-saved OpenAPI specification: Design --> Frontend -> OpenAPI specification editor

This issue only appeared today. I made a half dozen updates yesterday with no issue.









0 Votes 0 ·

Same error for us also... Parsing error(s): OpenAPI specification version '{ "openapi": "3.0.1", "info": {...

0 Votes 0 ·
Show more comments

1 Answer

MayankBargali-MSFT avatar image
2 Votes"
MayankBargali-MSFT answered JaimeHuffman-3696 commented

@JaimeHuffman-3696 @ChristoGreeff @DenisProhorenko-8031 Apology for the inconvenience due to this issue. There was a portal issue that was fixed yesterday (04/11). Can you please confirm if you are still observing the same behavior?

If someone is still facing the issue while importing the open API then please refer to the unsupported OpenAPI spec for ver 3.0 x if this is not the case. If you validated that your open API spec does not have the unsupported fields then please feel free to tag me in or open a support ticket with us to assist you further.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MayankBargali-MSFT Resolved for us, thank you

1 Vote 1 ·

I just tried to upload my schema and it was successful.
Thanks for the update

1 Vote 1 ·

I'm fixed now. Thank you!

1 Vote 1 ·