ramosbugs / aws-sam-rest-api-repro

Reproduces route dedupe bug in https://github.com/aws/aws-sam-cli/pull/2458

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

To reproduce:

The following assumes that the aws-sam-cli PR #2458 branch has been checked out into ../aws-sam-cli and that a virtualenv has been initialized properly.

To start the API:

$ python ../aws-sam-cli/samcli local start-api

Actual output:

$ curl http://127.0.0.1:3000/foo
{"message": "routed to handler getFoo"}
$ curl -X POST http://127.0.0.1:3000/foo
{"message": "routed to handler getFoo"}

Note that both requests are supplied an operationName of getFoo. The latter request should be postFoo.

Expected output:

$ curl http://127.0.0.1:3000/foo
{"message": "routed to handler getFoo"}
$ curl -X POST http://127.0.0.1:3000/foo
{"message": "routed to handler postFoo"}

About

Reproduces route dedupe bug in https://github.com/aws/aws-sam-cli/pull/2458

License:MIT License


Languages

Language:Python 100.0%