prasathkrishvij
2 years agoVisitor
why swagger not associates description to $ref when converting annotation to yml
I'm having a use case where I'm using multiple variables of same class type, when using like this description provided in @Schema of variable level is overriding . How to avoid this and any work around without creating new class for each variable?
Eg:
Class Response{
@Schema(description = "Description 1")
private TypeA variable1;
@Schema(description = "Description 2")
private TypeA variable2;
}
@Schema(description = "Description 1")
private TypeA variable1;
@Schema(description = "Description 2")
private TypeA variable2;
}
even though we gave description in yaml $ref was only there and in UI in all the variable description it is showing Description 1