AS AgentScopeAPI 手册 / API Reference

AdminOpenApiConfiguration

@Configuration(proxyBeanMethods = false) @ConditionalOnClass({GroupedOpenApi.class, OpenAPI.class}) public class AdminOpenApiConfiguration
源码Source io/agentscope/spring/boot/admin/openapi/AdminOpenApiConfiguration.java:55–108

管理台打开 API 配置,保存相关配置项。位于 io.agentscope.spring.boot.admin.openapi 包。核心成员包括 agentscopeAdminOpenApi、agentscopeAdminOpenApiDefinition。

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 io.agentscope.spring.boot.admin.AgentscopeAdminAutoConfiguration; marked ConditionalOnClass on the springdoc tag so the class never fails to load when springdoc is absent.

方法摘要Method Summary

方法Method说明Description
public GroupedOpenApi agentscopeAdminOpenApi(AdminProperties properties)
设置该参数。
Group all admin routes under their own Swagger UI definition.
public OpenAPI agentscopeAdminOpenApiDefinition(AdminProperties properties, AdminCommandRegistry registry)
执行 `agentscopeAdminOpenApiDefinition` 方法。
Provide a default top-level `OpenAPI` bean if the consumer has not declared one.

方法详情Method Detail

agentscopeAdminOpenApi

public GroupedOpenApi agentscopeAdminOpenApi(AdminProperties properties)

设置该参数。

Group all admin routes under their own Swagger UI definition.

参数Parameters
名称Name类型Type说明Description
propertiesAdminProperties属性(类型 `AdminProperties`)。The properties.
返回Returns GroupedOpenApi
返回GroupedOpenApi。Returns grouped open api.
源码Source io/agentscope/spring/boot/admin/openapi/AdminOpenApiConfiguration.java:60–69

agentscopeAdminOpenApiDefinition

public OpenAPI agentscopeAdminOpenApiDefinition(AdminProperties properties, AdminCommandRegistry registry)

执行 agentscopeAdminOpenApiDefinition 方法。

Provide a default top-level OpenAPI bean if the consumer has not declared one.

参数Parameters
名称Name类型Type说明Description
propertiesAdminProperties属性(类型 `AdminProperties`)。The properties.
registryAdminCommandRegistry注册表(类型 `AdminCommandRegistry`)。The registry.
返回Returns OpenAPI
返回OpenAPI。Returns open API.
源码Source io/agentscope/spring/boot/admin/openapi/AdminOpenApiConfiguration.java:76–107
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.