Skip to content

The HttpTriggerOptions.route property needs better documentation #103

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

Closed
anddoutoi opened this issue Jun 21, 2023 · 2 comments
Closed

The HttpTriggerOptions.route property needs better documentation #103

anddoutoi opened this issue Jun 21, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement P2

Comments

@anddoutoi
Copy link

anddoutoi commented Jun 21, 2023

Figuring out what patterns and syntax the route property supports is hard. Finding clear documentation is close to impossible.

I think that a page like Express routing but for azure functions/static web apps API routing is needed.

@ejizba ejizba added documentation Improvements or additions to documentation enhancement P3 labels Jul 10, 2023
@ejizba ejizba added this to the Backlog Candidates milestone Jul 10, 2023
@ejizba
Copy link
Contributor

ejizba commented Jul 26, 2023

We got more feedback that this is confusing, so bumping priority a bit

https://github.com/MicrosoftDocs/azure-docs/issues/112725

Especially for model v4, it seems like you should be able to use route parameters like this:

app.http('httpTrigger1/{id}', {
    methods: ['GET', 'POST'],
    authLevel: 'anonymous',
    handler: httpTrigger1
});

But you have to do this:

app.http('httpTrigger1', {
    methods: ['GET', 'POST'],
    authLevel: 'anonymous',
    route: 'httpTrigger1/{id}',
    handler: httpTrigger1
});

@ejizba
Copy link
Contributor

ejizba commented Oct 10, 2023

@ejizba ejizba closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement P2
Projects
None yet
Development

No branches or pull requests

2 participants