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
Upgrading from 6.1.4 to 6.1.5 causes System.ArgumentNullException: Value cannot be null. (Parameter 'source') to be thrown when generating swagger.json.
Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Failed to generate Operation for action - WebApplication9.Controllers.AnimalsController.Post (WebApplication9). See inner exception
---> System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorOptions.DefaultOperationIdSelector(ApiDescription apiDescription)
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperation(ApiDescription apiDescription, SchemaRepository schemaRepository)
--- End of inner exception stack trace ---
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperation(ApiDescription apiDescription, SchemaRepository schemaRepository)
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperations(IEnumerable`1 apiDescriptions, SchemaRepository schemaRepository)
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GeneratePaths(IEnumerable`1 apiDescriptions, SchemaRepository schemaRepository)
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwagger(String documentName, String host, String basePath)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
I believe it's caused by the most recent code changes in #2173, related to #2165.
Thank you.
The text was updated successfully, but these errors were encountered:
@captainsafia, @bradygaster looks like the PR to use endpoint metadata for operationId may be causing a regression with the latest release. Could you possibly take a quick look to see if there's an easy fix? Thx
Hi.
Upgrading from 6.1.4 to 6.1.5 causes
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
to be thrown when generating swagger.json.I've created a repository which can reproduce the issue here:
https://github.com/icnocop/Swashbuckle.AspNetCore.InheritanceExample
I believe it's caused by the most recent code changes in #2173, related to #2165.
Thank you.
The text was updated successfully, but these errors were encountered: