Azure / azure-functions-java-library

Contains annotations for writing Azure Functions in Java
MIT License
42 stars 42 forks source link

PATCH is missing from HttpMethods #130

Closed szirbucz closed 1 year ago

szirbucz commented 3 years ago

I would like to create a HTTP trigger for a PATCH request, but I sadly recognized that there is no option for it.

Ganwel commented 3 years ago

Is there a specific reason for that? I have the same issue here. Not able to use PATCH with an Azure function

cascer1 commented 2 years ago

We are also running into this issue.

vdlmark commented 2 years ago

This seems like an oversight. Can this be added on short term?

kaibocai commented 2 years ago

Add a workaround for this: after build your jar file find the function.json file and change the method to PATCH, then no matter what method type you defined in your functions it will always be treated as a PATCH method.

example:

{
  "scriptFile" : "../fabrikam-functions-1.0-SNAPSHOT.jar",
  "entryPoint" : "com.fabrikam.Function.run",
  "bindings" : [ {
    "type" : "httpTrigger",
    "direction" : "in",
    "name" : "req",
    "methods" : [ "PATCH" ],
    "authLevel" : "ANONYMOUS"
  }, {
    "type" : "http",
    "direction" : "out",
    "name" : "$return"
  } ]
}
leonfau commented 2 years ago

Can you create a new release with the PATCH included?

kaibocai commented 2 years ago

Hi @leonfau , thanks for reaching out. The new release will be ready in next month. We also include some new features, right now it's under end to end and regression testing process. Thanks for your understanding.

kaibocai commented 1 year ago

This is resolved in current release.