collect_endpoints

classmethod ChildAPI.collect_endpoints()

收集当前 API 类暴露的所有相对 endpoint

该方法会扫描当前类中使用 @get / @post 装饰的方法, 同时递归展开返回类型为 ChildAPIcached_property, 以便在生成接口文档、做权限校验或批量检查接口覆盖率时复用。

返回类型

List[str]

返回

当前 API 类可访问的相对路径列表,例如 [‘/query’, ‘/detail/open’]