Azure / Azure/azure-functions-java-library

Incorrect Javadoc comment in HttpTrigger.java

Open
#131 2 comments 0 reactions 0 assignees View on GitHub
area:java-functions
Dominant language
Java
Stars
45
Forks
49
PR merge metrics
No merged PRs in 30d

Description

The following Javadoc describes the HttpTriger route method, but the sample described is incorrect and causes a compile error.

https://docs.microsoft.com/en-us/java/api/com.microsoft.azure.functions.annotation.httptrigger.route?view=azure-java-stable#com_microsoft_azure_functions_annotation_HttpTrigger_route__

The correct method type is `HttpResponseMessage`, not `HttpResponseMessage`.

```java
@FunctionName("routeTest")
public HttpResponseMessage routeTest(
@HttpTrigger(name = "req",
methods = {HttpMethod.GET},
authLevel = AuthorizationLevel.ANONYMOUS,
route = "products/{category:alpha}/{id:int}")
HttpRequestMessage> request,
@BindingName("category") String category,
@BindingName("id") int id,
final ExecutionContext context
) {
....
context.getLogger().info("We have " + category + " with id " + id);
....
}
```

This Javadoc is probably auto-generated from the following link.
Please fix it.

https://github.com/Azure/azure-functions-java-library/blob/dev/src/main/java/com/microsoft/azure/functions/annotation/HttpTrigger.java#L140

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.