Unable to identify the Swagger version or the Swagger version is unsupported

Not applicable

Error message: Unable to identify the Swagger version or the Swagger version is unsupported

I am working through the samples from GitHub and have brought in the Swagger example which appears to be correct (called 'OpenAPI Specification for the Apigee mock target service endpoint'). It says it is version 1.0.

When I try to create an API based on this and point it to the swagger document I get the message "Unable to identify the Swagger version or the Swagger version is unsupported".

I would have expected the sample on GitHub to be correct but maybe it is dated.

Solved Solved
1 7 4,498
1 ACCEPTED SOLUTION

@Chris Allen ,

It's a bug. Found out the root cause.

It's due to YAML OpenAPI Spec imported as URL. We are working on a fix as we speak. As a workaround, please use JSON OpenAPI Spec for time being. You can convert from YAML to JSON using http://playground.apistudio.io/, Use Downloads -> JSON after you copy paste YAML in editor.

We will keep you posted.

View solution in original post

7 REPLIES 7

Not applicable

the file upload only allows swagger 2.0. You can upload swagger 1.0 with a url. You can verify the swagger 2.0 is correctly formatted here: http://editor.swagger.io/#/

If you want to convert swagger 1.0 to swagger 2.0 this works: https://github.com/apigee-127/swagger-converter

@Chris Allen , I can able to reproduce same. Sorry for the inconvenience. We will keep you posted. Thank you for highlighting same.

@Chris Allen ,

It's a bug. Found out the root cause.

It's due to YAML OpenAPI Spec imported as URL. We are working on a fix as we speak. As a workaround, please use JSON OpenAPI Spec for time being. You can convert from YAML to JSON using http://playground.apistudio.io/, Use Downloads -> JSON after you copy paste YAML in editor.

We will keep you posted.

Hi @ChrisAllen,

Another possible workaround. After you import the document using the URL, open it in the spec editor and click Save. Then, try generating the API proxy. Hoping that this works for you and unblocks you for now. A fix is being investigated.

Thank you and, as already stated, apologies for the inconvenience.

Liz

Hi Liz,

I converted the swagger 2.0 document to json (and saved as a file) and then imported the file to create the API with no issues.

I followed Liz's comments on import the spec, open it in editor, hit save (critical step). Then go create the proxy from the spec. It worked seamlessly and could all be done in the Edge editor.

Not applicable

This error still exists

I can successfully import an URL with openapi: 3.0.1 spec

then when I try to 'generate api proxy' I face this error: Unable to identify the Swagger version or the Swagger version is unsupported

Another observation: If I use the same URL and upload the spec. Then replace 'openapi: 3.0.1' with swagger: 2.0 then it shows some error. But I can still generate api proxy and which runs successfully. but the issue: this time you can not choose the proxy type (reverse proxy, soap service etc)

Therefore, I assume it's a bug. I am using apigee edge (not the old apigee classic)