我们看一个swagger自带的 petstore open api 例子: https://petstore.swagger.io/v2/swagger.json
{"swagger":"2.0","info":{"description":"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.","version":"1.0.3","title":"Swagger Petstore","termsOfService":"http://swagger.io/terms/","contact":{"email":"[email protected]"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"petstore.swagger.io","basePath":"/v2","tags":[...],"schemes":["https","http"],"paths":{..."definitions":{...},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}}
我们可以看到在这个open API 定义文件里面包含了我们在swagger界面上看到的一切,paths,definitions等。