Skip to content

SwaggerSpecFilter with removingUnreferencedDefinitions, removes definitions within containers (List/Map) #1757

@mtraynham

Description

@mtraynham

The example condition is at (but there are other lines just like it):
https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-core/src/main/java/io/swagger/core/filter/SpecFilter.java#L140

if (response.getSchema() != null && response.getSchema() instanceof RefProperty) {

As an example:

public List<Foobar> getAll() {
    ...
}

Will filter out the FooBar definition, as the operation's response is an ArrayProperty which does not extend RefProperty.

public Foobar getAll() {
    ...
}

Retains this property correctly...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions