Skip to content

Derived class is not using the base class schema filter #1197

@OskarKlintrot

Description

@OskarKlintrot

VERSION:

5.6.0

STEPS TO REPRODUCE:

Create a base class with a SwaggerSchemaFilter-attribute.

EXPECTED RESULT:

Classes inheriting the base class should be leveraging the same schema filter as the base class.

ACTUAL RESULT:

The schema filter is ignored on the derived class.

ADDITIONAL DETAILS

To put it in context; I have a JsonConverter that turns a class with a single IEnumerable property into an json array instead of a json object. I want to create an abstract base class that has both the JsonConverter-attribute as well as the SwaggerSchemaFilter-attribute on it. Then all that is need is to derive from SingleJsonArrayResponse<T> in order for both the serialized json and the Swagger example to be correct.

Is this by design, an anti pattern or an actual bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions