This topic describes how to import and export API definitions based on the OpenAPI Specification (OAS) standard and how to import Swagger-compliant extensions. This helps you manage and maintain API services efficiently, securely, and automatically.
Import OAS-compliant APIs
API Gateway allows you to import API definitions that follow the OpenAPI Specification (OAS) 2.0 or 3.0 standard. API Gateway also allows you to import OAS-compliant extensions. This helps you quickly migrate existing APIs to API Gateway. These APIs can be used and managed in API Gateway directly without modification. Specifically:
Mappings between the parameters in an OAS 2.0-complinant API definition and an API Gateway API definition.
Mappings between the parameters in an OAS 3.0-complinant API definition and an API Gateway API definition.
Import OAS 2.0-complinant API definitions that contain API Gateway extensions
Export APIs based on OAS
API Gateway allows you to export API definitions based on the OAS 2.0 or OAS 3.0 standard. This way, you can migrate API data across accounts, regions, or even platforms for flexible API management and deployment. Specifically:
Export OAS-compliant APIs
You can export an entire API group or specific APIs.
Import Swagger files to create APIs with API Gateway extensions
You can import a Swagger 2.0 file to create an API in the API Gateway console or by calling the ImportSwagger operation. Specifically:
Extensions supported by Swagger: Swagger supports extensions to its native Operation Object. Extensions are used to provide features for authentication, parameter mapping, and backend service purposes.
Compatibility: comparison between parameter types in Swagger and those in API Gateway.
Swagger extension examples: examples of Swagger extensions for API Gateway.
Usage notes: the items to which you must pay attention when you use the feature.