Azure / Azure/azure-functions-dotnet-worker
Add OpenAPI extension marker
- Dominant language
- C#
- Stars
- 466
- Forks
- 215
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 7
Description
Hi, Team.
After @fabiocav and I discussed how to integrate the OpenAPI extension to this isolated worker, we concluded that this worker would need logic to find a marker to recognise the OpenAPI extension.
Because the OpenAPI extension runs on top of the HTTP trigger binding, it would need an extra marker – `OpenApiOperationAttribute`. All HTTP endpoints exposed to both OpenAPI document and Swagger UI must be decorated with the `OpenApiOperationAttribute` class like:
```csharp
[Function("UpdatePet")]
[OpenApiOperation((operationId: "updatePet", ...)]
...
public static async Task UpdatePet(
[HttpTrigger(AuthorizationLevel.Function, "PUT", Route = "pet")] HttpRequestData req,
FunctionContext executionContext)
{
...
}
```
Therefore, the `OpenApiOperationAttribute` can work as a marker. Could you please have a look and update the core logic in accordance with this requirement?
Related to: #473
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the isolated worker's core logic for HTTP trigger bindings and how it identifies OpenAPI endpoints. Verify how OpenApiOperationAttribute is exposed by the extension and define completion as HTTP endpoints decorated with that marker being recognized for OpenAPI documentation and Swagger UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, openapi
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100