Class AdminOpenApiConfiguration

java.lang.Object
io.agentscope.spring.boot.admin.openapi.AdminOpenApiConfiguration

@Configuration(proxyBeanMethods=false) @ConditionalOnClass({org.springdoc.core.models.GroupedOpenApi.class,io.swagger.v3.oas.models.OpenAPI.class}) public class AdminOpenApiConfiguration extends Object
Wires the admin starter into springdoc-openapi only when springdoc is on the classpath.

Consumers opt in by adding springdoc-openapi-starter-webmvc-ui to their app pom (it is declared as optional here). When present:

  • A GroupedOpenApi named agentscope-admin surfaces only the admin REST routes, so the admin surface shows up as a separate tab in Swagger UI.
  • An OpenAPI bean (when none is present) sets sensible title / description / version metadata and registers one OpenAPI Tag per AdminCommand category — so Swagger UI groups routes by AgentStateStore / Agent / System.

Loaded lazily by AgentscopeAdminAutoConfiguration; marked ConditionalOnClass on the springdoc tag so the class never fails to load when springdoc is absent.

  • Constructor Details

    • AdminOpenApiConfiguration

      public AdminOpenApiConfiguration()
  • Method Details

    • agentscopeAdminOpenApi

      @Bean public org.springdoc.core.models.GroupedOpenApi agentscopeAdminOpenApi(AdminProperties properties)
      Group all admin routes under their own Swagger UI definition.
    • agentscopeAdminOpenApiDefinition

      @Bean @ConditionalOnMissingBean(io.swagger.v3.oas.models.OpenAPI.class) public io.swagger.v3.oas.models.OpenAPI agentscopeAdminOpenApiDefinition(AdminProperties properties, AdminCommandRegistry registry)
      Provide a default top-level OpenAPI bean if the consumer has not declared one. Tags are seeded from the AdminCommandRegistry so each category AgentStateStore/Agent/System gets its own labelled group in Swagger UI.