Expose ApiDescriptionProvider types and methods (so other projects can use it)
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Endpoint Metadata Parsing methods are not accessible
Many third parties might be interested in retrieving metadata from endpoints for e.g. openapi spec generation
https://github.dev/dotnet/aspnetcore/blob/94ffe0356177368d73f98021da53456fc658fcd4/src/Mvc/Mvc.ApiExplorer/src/EndpointMetadataApiDescriptionProvider.cs#L28
### Describe the solution you'd like
It would be appreciated if metadata from endpoint could be easilly navigated and extracted (e.g. Expression of invoked lambda/delegate, main properties of lambda/delegate, return type, parameters type, HTTP method name, etc....)
that way endpoints could be inspected at runtime just checking
```
IEnumerable
```
but right now it's hard and very tough to do especially for NON MVC projects (even requires quite elaborated reflection to access endpoint info...)
### Additional context
https://github.com/pimbrouwers/Falco/issues/49
https://github.com/giraffe-fsharp/Giraffe/issues/488#issuecomment-884217398
https://github.com/giraffe-fsharp/Giraffe/issues/428
https://github.com/giraffe-fsharp/Giraffe/issues/488
https://github.com/SaturnFramework/Saturn/issues/30
Contributor guide
Assessment
This issue has not been assessed yet.