0

Last time I upgraded to org.springdoc:springdoc-openapi-webflux-ui:1.4.3 and now I don't see Select a definition. enter image description here

Before I was using 1.2.31 version and then it looks like on the screen above.

Is there option to bring back that dropdown?

Helen
  • 87,344
  • 17
  • 243
  • 314
Arek Szast
  • 163
  • 4
  • 16

1 Answers1

-1

You need to make sure you have defined your APIs in a group in order to enable the select a defintion drop down list:

Here the code of demo with groups. For example:

@Bean
public GroupedOpenApi storeOpenApi() {
    String paths[] = {"/store/**"};
    return GroupedOpenApi.builder().group("stores").pathsToMatch(paths)
            .build();
}
brianbro
  • 4,141
  • 2
  • 24
  • 37
  • I've got it: `@Bean public List apis() { return routeDefinitionLocator.getRouteDefinitions() .filter(routeDefinition -> routeDefinition.getId().matches(".*-service-docs|.*-adapter-docs")) .map(routeDefinition -> routeDefinition.getId().replace("-docs", "")) .map(serviceId -> GroupedOpenApi.builder() .pathsToMatch("/" + serviceId + "/**") .setGroup(serviceId).build()) .collectList() .block(); }` But it's not working on newest version – Arek Szast Aug 09 '20 at 20:40
  • Here is the link for a full working code, with spring cloud gateway:https://github.com/springdoc/springdoc-openapi-demos/blob/master/sample-springdoc-openapi-microservices/gateway-service/src/main/java/org/springdoc/demo/services/gateway/GatewayApplication.java – brianbro Aug 10 '20 at 21:19