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

Allow expanded configuration #8

Merged
merged 1 commit into from
Sep 12, 2022
Merged

Allow expanded configuration #8

merged 1 commit into from
Sep 12, 2022

Conversation

shadowhand
Copy link
Contributor

@shadowhand shadowhand commented Sep 10, 2022

Currently the router does not allow expanded configuration, such as:

functions:
  api:
    handler: api.php
    events:
      - httpApi:
          method: '*'
          path: '*'
          authorizers:
            name: auth0

Fixes #6
A more robust solution than #7 (IMO)

@mnapoli
Copy link
Member

mnapoli commented Sep 12, 2022

Thanks!

@mnapoli mnapoli added the enhancement New feature or request label Sep 12, 2022
@mnapoli mnapoli merged commit 7ffe34a into brefphp:master Sep 12, 2022
Comment on lines +38 to +39
$method = $pattern['method'] ?? '*';
$path = $pattern['path'] ?? '*';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I have confirmed that * works for both method and path when using Serverless Framework.

@shadowhand shadowhand deleted the fix/expanded-http-routing branch September 12, 2022 13:01
@shadowhand
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failure to parse serverless.yml
2 participants