-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Describe the bug
The returnTypeAttributes result can be null if MethodInfo is null which raise a ArgumentNullException in ToContextutalType.
NSwag/src/NSwag.Generation.AspNetCore/Processors/OperationResponseProcessor.cs
Lines 79 to 80 in 2a5ca6e
| var returnTypeAttributes = context.MethodInfo?.ReturnParameter?.GetCustomAttributes(false).OfType<Attribute>(); | |
| var contextualReturnType = returnType.ToContextualType(returnTypeAttributes); |
Version of NSwag toolchain, computer and .NET runtime used
Nswag: 14.2.0 but also tested with 14.6.3
.NET: 6.0
To Reproduce
Code example:
Expected behavior
Swagger is rendered correctly.
Metadata
Metadata
Assignees
Labels
No labels