Skip to content

Conversation

nrako
Copy link

@nrako nrako commented Jan 29, 2017

functions:
  foo:
    handler: handler.foo
    events:
      - http:
          path: foo/{bar+}
          method: get

Catch-all Path Variables – Instead of specifying individual paths and behaviors for groups of requests that fall within a common path (such as /store/), you can now specify a catch-all route that intercepts all requests to the path and routes them to the same function. For example a single greedy path (/store/{proxy+}) will intercept requests made to /store/list-products, /store/add-product, and /store/delete-product.

source: https://aws.amazon.com/blogs/aws/api-gateway-update-new-features-simplify-api-development/

PR #82 has some work around this but, from my test, it's implementation doesn't match what AWS has. e.g the name variable doesn't need to be called {proxy+}. And the named path variable must be available in event.pathParameters.

@HyperBrain
Copy link
Member

serve will be removed in the next v3.0.0 release in favor of serverless-offline (see #152 ). No efforts will be spent on the function anymore. So I'll close this issue.

@HyperBrain HyperBrain closed this Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants