Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) CloudFormation AWS::ApiGateway::Methods and AWS::ApiGateway::Resources support #1247

Merged
merged 78 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
8f6b8fb
Initial setup and work
viksrivat Jun 17, 2019
f457401
Add RestApi tests
viksrivat Jun 19, 2019
8112cf4
Remove Stage Name/Variable from pr
viksrivat Jun 20, 2019
5050dd8
Run make pr
viksrivat Jun 20, 2019
bf5a083
Add Rest Api integration test
viksrivat Jun 20, 2019
6eb226a
Remove AWS::Stage from current pr
viksrivat Jun 20, 2019
7c5823d
Update integration test to only use CloudFormation types
viksrivat Jun 20, 2019
4966513
Re-run Travis Ci
viksrivat Jun 24, 2019
2c38ede
Update Uri to BodyS3Location
viksrivat Jun 24, 2019
9d3d137
Add docstring to extract_swagger_api
viksrivat Jun 24, 2019
b6d9b62
Fix Merge conflicts with dev and branch
viksrivat Jun 24, 2019
f8ac623
Update AWS::ApiGateway::Stage tests
viksrivat Jun 24, 2019
54bda7f
Test local file in body fail and clean tests
viksrivat Jun 24, 2019
9b06696
Initial Attempt
viksrivat Jun 25, 2019
145162e
Refactor Sam API provider
viksrivat Jun 25, 2019
5615163
Cleanup Refactoring
viksrivat Jun 25, 2019
752fba8
Merge pull request #1 from viksrivat/feature/cloud_formation_api_prov…
viksrivat Jun 25, 2019
1157284
Update AWS::ApiGateway::Stage tests
viksrivat Jun 24, 2019
5d1dfc7
Fix merge conflict
viksrivat Jun 25, 2019
7ed267c
Remove .vscode
viksrivat Jun 25, 2019
681ede3
Re-run travis
viksrivat Jun 25, 2019
a0f5837
Restructure the information Api has the way it passed through
viksrivat Jun 26, 2019
a3ca29f
Merge pull request #2 from viksrivat/cleanup/update_common_stage_feat…
viksrivat Jun 26, 2019
0078786
Update common
viksrivat Jun 26, 2019
9879105
Merge branch 'feature/cloud_formation_stage_support' of github.com:vi…
viksrivat Jun 26, 2019
a9117ad
Update AbstractParserProvider documentation
viksrivat Jun 26, 2019
997845c
Initial Refactor refactor
viksrivat Jun 26, 2019
de65fd0
Fix tests and run make pr
viksrivat Jun 26, 2019
df243a7
Fix merge conflict
viksrivat Jun 27, 2019
4555f11
Reorganize classes
viksrivat Jun 27, 2019
420a842
Update docstrings
viksrivat Jun 27, 2019
53f4b7e
Update the SAMBaseProvider
viksrivat Jun 27, 2019
856326e
Fix merge conflict
viksrivat Jun 27, 2019
6803a0b
Restructure to seperate SAM and CF providers seperately + tests
viksrivat Jun 27, 2019
837137f
Remove transform flag in the rest-api
viksrivat Jun 27, 2019
4130ea2
Remove BaseProvider object
viksrivat Jun 27, 2019
ec833dc
Fix merge conflict
viksrivat Jun 27, 2019
693692b
Update with style
viksrivat Jun 27, 2019
19eaebe
Update tests and code with comments
viksrivat Jun 27, 2019
d226f53
Fix merge conflicts with comments from feature/cfn_rest_api
viksrivat Jun 27, 2019
23467de
Update tests with comments
viksrivat Jun 28, 2019
7e25c02
Fix merge conflict tests
viksrivat Jun 28, 2019
066b236
Trigger
viksrivat Jun 28, 2019
36018f1
Start working on method&resources
viksrivat Jun 28, 2019
8987db2
Remove noapievent
viksrivat Jun 28, 2019
626ea71
Update cloud_formation resource processing
viksrivat Jun 28, 2019
666b2e4
Update cfn_api_provider
viksrivat Jun 28, 2019
4a792bf
Update tests
viksrivat Jun 28, 2019
644b851
Update merge conflictz
viksrivat Jun 28, 2019
efdc3a4
Merge changes from stage
viksrivat Jun 28, 2019
fd4ab05
Add tests for resources&methods
viksrivat Jun 28, 2019
238742a
Fix bug with api
viksrivat Jun 29, 2019
739e74b
Update tests with make pr
viksrivat Jun 29, 2019
1d2e2b1
Fix tests and binary_types
viksrivat Jun 29, 2019
78341e9
Fix pathpart code
viksrivat Jun 29, 2019
2d0da34
Add cdk templates
viksrivat Jun 29, 2019
1c29946
Add serverless template
viksrivat Jun 29, 2019
7662f24
Fixed comments
viksrivat Jul 8, 2019
3df93ba
Update tests
viksrivat Jul 9, 2019
cc21095
Fix merge with rest_api
viksrivat Jul 9, 2019
b50e644
Remove Invalid Integration Test
viksrivat Jul 9, 2019
a01aee2
Run make pr
viksrivat Jul 9, 2019
8d2abd0
Fix merge conflict with stage
viksrivat Jul 9, 2019
49d16b4
feat(start-api): CloudFormation AWS::ApiGateway::RestApi support (#1238)
viksrivat Jul 23, 2019
aeba546
feat(start-api): CloudFormation AWS::ApiGateway::Stage Support (#1239)
viksrivat Jul 26, 2019
07830b9
Merge branch 'start-api/cfn' into feature/cloud_formation_method_reso…
viksrivat Jul 29, 2019
fa2472d
Fix merge issue with cfn_api_provider
viksrivat Jul 29, 2019
b594aed
Update tests
viksrivat Jul 29, 2019
3d79b5c
Fix Integration Tests
viksrivat Jul 29, 2019
45e7e51
Fix Integration Tests
viksrivat Jul 29, 2019
d751f00
Merge branch 'start-api/cfn' into feature/cloud_formation_method_reso…
viksrivat Aug 8, 2019
0bb1d3b
Update with comments
viksrivat Aug 9, 2019
33be359
Update method docstring
viksrivat Aug 9, 2019
b9b7396
Fix style for flake8
viksrivat Aug 9, 2019
fe2a2bb
Merge branch 'develop' into feature/cloud_formation_method_resources
jfuss Aug 9, 2019
fa3006d
Merge branch 'develop' into feature/cloud_formation_method_resources
jfuss Aug 10, 2019
7365d2c
Update intrinsic Test by fixing overriden yaml values
viksrivat Aug 12, 2019
2e1b4e1
Merge branch 'develop' into feature/cloud_formation_method_resources
jfuss Aug 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions samcli/commands/local/lib/local_api_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging

from samcli.local.apigw.local_apigw_service import LocalApigwService, Route
from samcli.commands.local.lib.sam_api_provider import SamApiProvider
from samcli.commands.local.lib.sam_api_provider import ApiProvider
from samcli.commands.local.lib.exceptions import NoApisDefined

LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -38,9 +38,9 @@ def __init__(self,
self.static_dir = static_dir

self.cwd = lambda_invoke_context.get_cwd()
self.api_provider = SamApiProvider(lambda_invoke_context.template,
parameter_overrides=lambda_invoke_context.parameter_overrides,
cwd=self.cwd)
self.api_provider = ApiProvider(lambda_invoke_context.template,
parameter_overrides=lambda_invoke_context.parameter_overrides,
cwd=self.cwd)
self.lambda_runner = lambda_invoke_context.local_lambda_runner
self.stderr_stream = lambda_invoke_context.stderr

Expand Down Expand Up @@ -89,7 +89,7 @@ def _make_routing_list(api_provider):

Parameters
----------
api_provider : samcli.commands.local.lib.sam_api_provider.SamApiProvider
api_provider : samcli.commands.local.lib.sam_api_provider.ApiProvider

Returns
-------
Expand All @@ -116,10 +116,14 @@ def _print_routes(api_provider, host, port):
Mounting Product at http://127.0.0.1:3000/path1/bar [GET, POST, DELETE]
Mounting Product at http://127.0.0.1:3000/path2/bar [HEAD]

:param samcli.commands.local.lib.provider.ApiProvider api_provider: API Provider that can return a list of APIs
:param string host: Host name where the service is running
:param int port: Port number where the service is running
:returns list(string): List of lines that were printed to the console. Helps with testing
:param samcli.commands.local.lib.provider.AbstractApiProvider api_provider:
API Provider that can return a list of APIs
:param string host:
Host name where the service is running
:param int port:
Port number where the service is running
:returns list(string):
List of lines that were printed to the console. Helps with testing
"""
grouped_api_configs = {}

Expand Down
2 changes: 1 addition & 1 deletion samcli/commands/local/lib/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def __hash__(self):
Cors = namedtuple("Cors", ["AllowOrigin", "AllowMethods", "AllowHeaders"])


class ApiProvider(object):
class AbstractApiProvider(object):
"""
Abstract base class to return APIs and the functions they route to
"""
Expand Down
Loading