From a0bee69a34fd5152a5130ba135c990c7e98d758a Mon Sep 17 00:00:00 2001 From: Yumeng Xu Date: Fri, 14 Jun 2019 17:36:21 +0800 Subject: [PATCH 1/2] Add exportType option Add exportType option and allow specify OpenAPI 3.0 --- src/downloadDocumentation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/downloadDocumentation.js b/src/downloadDocumentation.js index d41892a..280abf3 100644 --- a/src/downloadDocumentation.js +++ b/src/downloadDocumentation.js @@ -8,7 +8,7 @@ module.exports = { return aws.request('APIGateway', 'getExport', { stageName: this.serverless.service.provider.stage, restApiId: restApiId, - exportType: 'swagger', + exportType: this.options.exportType, parameters: { extensions: extensionType(this.options.extensions), }, From 692634e31c25eed8c9b656b5e8fdc973233052ee Mon Sep 17 00:00:00 2001 From: Yumeng Xu Date: Sat, 15 Jun 2019 21:35:53 +0800 Subject: [PATCH 2/2] add "swagger" as default exportType add "swagger" as default exportType to pass the test --- src/downloadDocumentation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/downloadDocumentation.js b/src/downloadDocumentation.js index 280abf3..d3de04a 100644 --- a/src/downloadDocumentation.js +++ b/src/downloadDocumentation.js @@ -8,7 +8,7 @@ module.exports = { return aws.request('APIGateway', 'getExport', { stageName: this.serverless.service.provider.stage, restApiId: restApiId, - exportType: this.options.exportType, + exportType: this.options.exportType? this.options.exportType: 'swagger', parameters: { extensions: extensionType(this.options.extensions), },