refactor: rename api group for custom api (#2419)

#### What type of PR is this?
/kind improvement
/kind api-change
/area core
/milestone 2.0

#### What this PR does / why we need it:
- 修改管理后台使用的自定义 API 的 group 为 `api.console.halo.run`
- 面向三方应用的自定义 API 的 group 为 `api.halo.run`
- 插件的自定义 API 的 group 为 `api.plugin.halo.run`

#### Which issue(s) this PR fixes:

Fixes #2418

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
None
```
This commit is contained in:
guqing
2022-09-20 00:24:35 +08:00
committed by GitHub
parent 9fdc9c1bb7
commit a39cf2645e
19 changed files with 55 additions and 54 deletions

View File

@@ -2,7 +2,7 @@
系统自定义 API 是一组特殊的 API因为自定义模型 API 无法满足要求,需要开发者自己实现。
但是系统自定义 API 有一个统一的前缀:`/apis/api.halo.run/v1alpha1/`,剩余的部分可随意定义。
但是系统自定义 API 有一个统一的前缀:`/apis/api.console.halo.run/v1alpha1/`,剩余的部分可随意定义。
## 如何在系统中创建一个系统自定义 API
@@ -39,7 +39,7 @@ public class UserEndpoint implements CustomEndpoint {
return SpringdocRouteBuilder.route()
.GET("/users/-", this::me, builder -> builder.operationId("GetCurrentUserDetail")
.description("Get current user detail")
.tag("api.halo.run/v1alpha1/User")
.tag("api.console.halo.run/v1alpha1/User")
.response(responseBuilder().implementation(User.class)))
// 这里可添加其他自定义 API
.build();