Support localization for endpoint attributes
Open
area-minimal
enhancement
feature-minimal-actions
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
Minimal APIs leans heavily into endpoint metadata for providing annotations to endpoints. This metadata can be populated onto an endpoint via extension methods or attributes.
```csharp
app.MapGet("/foo", [Tags("just", "some", "tags")] () => { ... })
.WithName("name");
```
When extension methods are used, the contents of the metadata can be localized using the standard IStringLocalizer experience. The same is not possible with attributes due to limitations with the parameters that can be used to initialize an attribute.
MVC supports localization of DataAnnotation attributes through some ✨ fanciness ✨ that we may consider replicating for minimal APIs.
Contributor guide
Assessment
This issue has not been assessed yet.