You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three-part fix for endpoints being invisible in OpenAPI documents:
1. Wrapper returns typed `Task<Results<...>>` instead of plain `Task`,
breaking the `RequestDelegate` signature match so `MapGet` picks the
`Delegate` overload and `RequestDelegateFactory` processes it.
2. `(Delegate)` cast on all endpoint registrations as a safety net,
explicitly forcing the `Delegate` overload regardless of signature.
3. Always emit explicit `ProducesResponseTypeMetadata` for every response
type, giving the OpenAPI document generator full response schema info.
Additionally:
- Add OpenAPI parameter extraction (route, query, header) via operation
transformer for `AddErrorOrOpenApi()` consumers
- Update README and CLAUDE.md examples from int to Guid
- Bump version to 3.5.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
**Why**: `(Delegate)` cast forces reflection; `Task<Results<...>>`cannot have `[JsonSerializable]`.
91
+
**Why**: Without `(Delegate)` cast, `Func<HttpContext, Task<T>>`matches `RequestDelegate` — endpoints become invisible to OpenAPI. The cast forces `RequestDelegateFactory` to process the delegate, enabling typed return inspection.
0 commit comments