Failure to import Swagger 1.2 JSON to SmartDocs

skammili
Participant II

Hello Community,

I am unable to import Swagger 1.2 JSON API doc to SmartDocs. It is saying no resources to show error.

Please see attached JSON file.

geodata-json.txt

Thanks for your help.

Sanjay

Solved Solved
0 6 641
1 ACCEPTED SOLUTION

Hi,

"Swagger 1.2 formats can only be imported by URL."

This is swagger 1.2 JSON and I hope you are trying to import by URL only not uploading file.

I tried with URL it get uploaded.

View solution in original post

6 REPLIES 6

Hi,

"Swagger 1.2 formats can only be imported by URL."

This is swagger 1.2 JSON and I hope you are trying to import by URL only not uploading file.

I tried with URL it get uploaded.

Thank you so much Sonali, you are right. I was trying to upload FILE instead of URL for Swagger 1.2 doc.

I did not look at the NOTE on the SmartDocs import screen. Thank you for pointing out.

@skammili , Any reason you are not using OpenAPI 2.0 (Swagger) spec instead of old 1.2 . Looks like your spec is simple.

Hi Sagar,

Thank you for your reply.

Our API code developer editor generates swagger 1.2 spec. In future release editor will support Swagger 2.0.

Mean while I am using a Swagger 1.2 to 2.0 converter to generate 2.0 API JSON.

https://apitransformer.com/

Do we have any Apigee equivalant for this converter?

Thanks,

Sanjay

Got it, unfortunately we don't have any at this point of time.

Well, there is the swagger-tools project that's a node package. It can convert 1.2 to 2.0. https://github.com/apigee-127/swagger-tools/blob/master/docs/CLI.md

But I'll second @Anil Sagar's point that 2.0 is much preferred. OpenAPI (the new name of the Swagger spec) has been at 2.0 for about 2 years and 3.0 is in development. Expect any 1.2 support for many projects to be end of lifed soon, including any Apigee tooling.