Skip to content

Inherited model definition won't get generated unless used in the API or explicitly mentioned #1740

@roni-frantchi

Description

@roni-frantchi

when attempting to inherit form a model not explicitly referenced by any other model explicitly used in the API, the model will not get generated in the definitions.

So for the following:

@ApiModel(parent = Parent.class)
public class Child extends Parent {
...
}

will only work for me if Parent is explicitly referenced somewhere in the exposed API.
to workaround it I would have to:

@ApiModel(parent = Parent.class)
public class Child extends Parent {
    private Parent dummyReference;
...
}

Or perhaps add a dummy API...

Metadata

Metadata

Assignees

No one assigned

    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