Skip to content

Services injected with attribute derived from FromKeyedServicesAttribute appear as request body in swagger #58739

@stevendarby

Description

@stevendarby

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

This is much like #50704 except for attributes derived from FromKeyedServicesAttribute. The fix for the previous issue only checked if the type was exactly FromKeyedServicesAttribute.

Expected Behavior

I'm hoping this could be changed to use something like IsAssignableTo/From so that it covers derived attributes too.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

Is there a workaround? e.g. some other "Ignore this" attribute I could apply to hide it?

Metadata

Metadata

Labels

area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapigood first issueGood for newcomers.help wantedUp for grabs. We would accept a PR to help resolve this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions