My output generated in the swagger-ui is:
DocumentChangeSet {
deletes (Collection«DocumentKey», optional),
updates (Collection«AbstractDocument», optional)
}
Collection«DocumentKey» {}
Collection«AbstractDocument» {}
Is there any way to make it go into more detail for the
deletes (Collection«DocumentKey», optional),
and
updates (Collection«AbstractDocument», optional)
to give a full break down of each of these parts?
My docket looks as follows:
@Bean
public Docket api(){
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
.genericModelSubstitutes(DeferredResult.class)
.alternateTypeRules(
newRule(typeResolver.resolve(DeferredResult.class,
typeResolver.resolve(DeferredResult.class,DocumentChangeSet.class)),
DocumentChangeSet.class)
)
.pathMapping("/")
.apiInfo(apiInfo());
}
To add more detail both documentKey and abstractDocument are annotated.
Below is the DocumentChangeSet class without any annotations.
public DocumentChangeSet(Collection<? extends AbstractDocument> updates, Collection<DocumentKey> deletes) {
this.updates = ImmutableSet.copyOf(updates);
this.deletes = ImmutableSet.copyOf(deletes);
}
@Override
public String toString() {
return Objects.toStringHelper(this)
.add("updates", updates.size())
.add("deletes", deletes.size())
.toString();
}
public Collection<AbstractDocument> getUpdates() {
return updates;
}
public Collection<DocumentKey> getDeletes() {
return deletes;
}