lambda_wrap 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lambda_wrap/api_gateway_manager.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98d1d6763689085d99bea7f6bde1fb23b7e34c7e
|
4
|
+
data.tar.gz: 3f251735a585aba1805cd841268bd083cb4dfafc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c29975f9940d716009cafddd38623a8e3b79bb727ba8104654d9221e0ab7b4b2b1258a900520dccee77c0f1ff0bd1ea57f26653bb591f5d12df3c8e965cc6d8a
|
7
|
+
data.tar.gz: eee2e631764d0f862eade7371e0702595813062238620436128275a7af397e50e88456385793f3c77a2a49b91c8c27c8c157050d271560a2675c95fd8234bf60
|
@@ -60,11 +60,12 @@ module LambdaWrap
|
|
60
60
|
# [api_name] The name of the API to which the swagger file should be applied to.
|
61
61
|
# [env] The environment where it should be published (which is matching an API gateway stage)
|
62
62
|
# [swagger_file] A handle to a swagger file that should be used by aws-apigateway-importer
|
63
|
-
|
63
|
+
# [api_description] The description of the API to be displayed.
|
64
|
+
def setup_apigateway(api_name, env, swagger_file, api_description = "Deployed with LambdaWrap")
|
64
65
|
|
65
66
|
# ensure API is created
|
66
67
|
api_id = get_existing_rest_api(api_name)
|
67
|
-
api_id = setup_apigateway_create_rest_api(api_name) if !api_id
|
68
|
+
api_id = setup_apigateway_create_rest_api(api_name, api_description) if !api_id
|
68
69
|
|
69
70
|
# create resources
|
70
71
|
setup_apigateway_create_resources(api_id, swagger_file)
|
@@ -114,10 +115,10 @@ module LambdaWrap
|
|
114
115
|
#
|
115
116
|
# *Arguments*
|
116
117
|
# [api_name] The name of the API to be created
|
117
|
-
def setup_apigateway_create_rest_api(api_name)
|
118
|
+
def setup_apigateway_create_rest_api(api_name, api_description)
|
118
119
|
|
119
120
|
puts 'Creating API with name ' + api_name
|
120
|
-
api = @client.create_rest_api({name: api_name})
|
121
|
+
api = @client.create_rest_api({name: api_name, description: api_description})
|
121
122
|
|
122
123
|
return api.id
|
123
124
|
|