Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to confirm the swagger version being used in my API?

I have integrated my REST API (developed on Jersey) with swagger 2.0 But when I see the Json listing, it shows me the following entries :

"apiVersion": "1.0.0",
"swaggerVersion": "1.2",

The swaggerVerison is listed to be 1.2, shouldn't it be 2.0 ?
How can I confirm that my API is using the swagger 2.0 ?

Due to some specific requirement, I must be using the 2.0 version of swagger, and after a lot of googling I'm not able to confirm this.

Thanks in advance.

like image 872
shashi009 Avatar asked Apr 08 '15 05:04

shashi009


People also ask

Can we test API using Swagger?

Swagger Inspector provides capabilities to easily inspect API request-responses, and make sure they work as expected. Automating your API testing and verifying that it functions correctly in different scenarios is dead simple with ReadyAPI. You can import your API definitions to: easily validate schema rules.

What is Swagger version?

Metadata. Every Swagger specification starts with the Swagger version, 2.0 being the latest version. A Swagger version defines the overall structure of an API specification – what you can document and how you document it.


1 Answers

I think you might be confusing between Swagger Core and Swagger UI.

The version 2.0 that you mentioned from github is the version of Swagger UI.

swaggerVersion 1.2 is the version of Swagger Core itself.

like image 157
Chhorn Elit Avatar answered Nov 15 '22 06:11

Chhorn Elit