From b1713ab36126e9417989b3f27e9339dbf2f50461 Mon Sep 17 00:00:00 2001 From: Luca Piccirillo Date: Fri, 1 Aug 2025 19:46:40 +0200 Subject: [PATCH] Warn about FromBody attribute name collision between namespaces Just aded two lifesaving comments in the code. The thing is already explained in the paragraph above but many people may overlook that explicit using when just looking for an example. Side note, also Copilot didn't suggest me to check that. --- .../functions-bindings-http-webhook-trigger.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/azure-functions/functions-bindings-http-webhook-trigger.md b/articles/azure-functions/functions-bindings-http-webhook-trigger.md index e254c2da78041..a9c1381bd45ef 100644 --- a/articles/azure-functions/functions-bindings-http-webhook-trigger.md +++ b/articles/azure-functions/functions-bindings-http-webhook-trigger.md @@ -668,7 +668,7 @@ When the trigger parameter is of type `HttpRequestData` or `HttpRequest`, custom using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.Functions.Worker; -using FromBodyAttribute = Microsoft.Azure.Functions.Worker.Http.FromBodyAttribute; +using FromBodyAttribute = Microsoft.Azure.Functions.Worker.Http.FromBodyAttribute; // <-- LOOK at this namespace AspNetIntegration { @@ -676,7 +676,7 @@ namespace AspNetIntegration { [Function(nameof(BodyBindingHttpTrigger))] public IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequest req, - [FromBody] Person person) + [FromBody] Person person) // WARNING this FromBody attribute is from above explicit fully qualified using { return new OkObjectResult(person); }