1 00:00:00,260 --> 00:00:02,100 ‫So in this example, if I go 2 00:00:02,100 --> 00:00:06,480 ‫to my Amazon API Gateway and I create an API, I can import, 3 00:00:06,480 --> 00:00:10,020 ‫so I scroll down to REST API, I can import one 4 00:00:10,020 --> 00:00:11,250 ‫and as we can see here, 5 00:00:11,250 --> 00:00:14,880 ‫we can import it from Swagger or OpenAPI 3. 6 00:00:14,880 --> 00:00:17,310 ‫And then I will need to paste a Swagger file. 7 00:00:17,310 --> 00:00:18,420 ‫So I don't have one, 8 00:00:18,420 --> 00:00:22,740 ‫but if I click on Example API, this is a Swagger file. 9 00:00:22,740 --> 00:00:23,820 ‫So Swagger 2.0, 10 00:00:23,820 --> 00:00:27,090 ‫which is the version right before OpenAPI 3. 11 00:00:27,090 --> 00:00:29,640 ‫And so this entire file is in JSON, 12 00:00:29,640 --> 00:00:32,400 ‫and describes how your API should be working. 13 00:00:32,400 --> 00:00:33,233 ‫So you can scroll down. 14 00:00:33,233 --> 00:00:35,590 ‫As you can see, it's a lot of different information 15 00:00:35,590 --> 00:00:38,520 ‫but as soon as I have this Example API, 16 00:00:38,520 --> 00:00:42,240 ‫what I can do is import it and automatically, 17 00:00:42,240 --> 00:00:43,230 ‫as you can see, 18 00:00:43,230 --> 00:00:46,470 ‫my API was created from this JSON document, 19 00:00:46,470 --> 00:00:48,000 ‫which is very handy. 20 00:00:48,000 --> 00:00:49,590 ‫Back into my APIs, 21 00:00:49,590 --> 00:00:53,670 ‫I can go to my first API that we had used before. 22 00:00:53,670 --> 00:00:55,920 ‫And if we go to my stages and I go, for example, 23 00:00:55,920 --> 00:00:59,970 ‫to the dev stage, I can look at the SDK generation 24 00:00:59,970 --> 00:01:02,460 ‫and generate an SDK, for example, for Java. 25 00:01:02,460 --> 00:01:04,290 ‫And we need to enter all these things 26 00:01:04,290 --> 00:01:07,500 ‫or we can export our API in the stage. 27 00:01:07,500 --> 00:01:11,520 ‫And so we can export it either as Swagger or OpenAPI 3. 28 00:01:11,520 --> 00:01:14,910 ‫And so I can click on this and then get it as YAML 29 00:01:14,910 --> 00:01:17,070 ‫or with the API Gateway extension, so I can click it, 30 00:01:17,070 --> 00:01:19,650 ‫get it as YAML or as a Postman extension. 31 00:01:19,650 --> 00:01:24,650 ‫So if I just open this one as YAML and then I scroll down, 32 00:01:24,780 --> 00:01:27,240 ‫I can see my entire API defined 33 00:01:27,240 --> 00:01:29,970 ‫as the OpenAPI specification. 34 00:01:29,970 --> 00:01:30,803 ‫And so if I scroll down, 35 00:01:30,803 --> 00:01:32,550 ‫I can see everything that was created, 36 00:01:32,550 --> 00:01:35,310 ‫including my different resources, my different methods, 37 00:01:35,310 --> 00:01:38,550 ‫how they were integrated with my Lambda functions and so on. 38 00:01:38,550 --> 00:01:39,690 ‫So I think it's very handy. 39 00:01:39,690 --> 00:01:40,860 ‫It's quite a cool feature. 40 00:01:40,860 --> 00:01:43,380 ‫And so that makes the API Gateway fully compatible 41 00:01:43,380 --> 00:01:45,870 ‫with the Swagger and OpenAPI spec. 42 00:01:45,870 --> 00:01:46,830 ‫So that's it for this lecture. 43 00:01:46,830 --> 00:01:49,613 ‫I hope you liked it, and I will see you in the next lecture.