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

Discover HttpTrigger Functions from Logic App does not work with custom routes #621

Closed
CrazyTuna opened this Issue Dec 9, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@CrazyTuna
Copy link

CrazyTuna commented Dec 9, 2017

I wrote some functions invoked from a Logic App. I've notices that HttpTrigger functions does not show up in the Logic App Action selector if they use a custom route.

This function will show up in Logic App:

[FunctionName("HttpTriggerCSharp")]
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequestMessage req, 
TraceWriter log)
{
    log.Info("C# HTTP trigger function processed a request.");
}

This function ill not show up in Logic App

FunctionName("HttpTriggerCSharp")]
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = "products/{id:int?}")]HttpRequestMessage req, int? id,
TraceWriter log)
{
    log.Info("C# HTTP trigger function processed a request.");
}
@ahmelsayed

This comment has been minimized.

Copy link

ahmelsayed commented Dec 11, 2017

@patricklee2

This comment has been minimized.

Copy link

patricklee2 commented Dec 12, 2017

@CrazyTuna I'm unable to reproduce the problem
Can you provide more details about the functions and the logic app?

@jeffhollan

This comment has been minimized.

Copy link
Member

jeffhollan commented Dec 12, 2017

Yes sorry this is by design. As Functions with routes as the way the Azure Function is invoked from Logic Apps is via calling an API "list invoke URL." That URL will look something like https://function.azurewebsites.net/api/my/{custom}/route?code=123 and Logic App doesn't have a way to parse the route template. In other words we don't know what is static, and what should be replaced, and don't have a way to "replace" that with the native action.

You can get around it by providing an OpenAPI definition for the function and we will render the card based on the path parameters specified in swagger. Can also not use route if need to show in Logic Apps.

@CrazyTuna

This comment has been minimized.

Copy link
Author

CrazyTuna commented Dec 12, 2017

@jeffhollan Thanks. I am gonna try the OpenAPI and close the issue.

@CrazyTuna CrazyTuna closed this Jan 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.