Skip to content

SwaggerGeneratorOptions.SchemaComparer isn't calling the configured Comparer #2741

@dlstucki

Description

@dlstucki

I'm trying to custom sort my schemas and SwaggerGeneratorOptions.SchemaComparer doesn't seem to have any effect.
 
Could the problem be that SchemaComparer getting skipped in this DeepCopy?

public void DeepCopy(SwaggerGeneratorOptions source, SwaggerGeneratorOptions target)
{
target.SwaggerDocs = new Dictionary<string, OpenApiInfo>(source.SwaggerDocs);
target.DocInclusionPredicate = source.DocInclusionPredicate;
target.IgnoreObsoleteActions = source.IgnoreObsoleteActions;
target.ConflictingActionsResolver = source.ConflictingActionsResolver;
target.OperationIdSelector = source.OperationIdSelector;
target.TagsSelector = source.TagsSelector;
target.SortKeySelector = source.SortKeySelector;
target.InferSecuritySchemes = source.InferSecuritySchemes;
target.DescribeAllParametersInCamelCase = source.DescribeAllParametersInCamelCase;

Using Swashbuckle.AspNetCore.SwaggerGen.6.5.0.0

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions