- The Serverless Framework uses CloudFormation to handle deployments.
- CloudFormation supports Swagger (see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html)
- You can override the default CloudFormation template generated by the Serverless Framework (see https://serverless.com/framework/docs/providers/aws/guide/resources#override-aws-cloudformation-resource)
I would start by trying something like:
resources:
Resources:
ApiGatewayRestApi:
Properties:
Body:
# Your swagger definition in YAML format goes here