Skip to content

Commit

Permalink
refactor: server core endpoints url (#310)
Browse files Browse the repository at this point in the history
* style: remove src/api/core-ikaros-run-v1alpha1-plugin-api.ts that it not use

* fix: core endpoints can not generate console api-client

* build: gen api clients and upgrade @runikaros/api-client version to 0.0.4

* fix: ci check fail

* fix: test cases run fail: SubjectEndpointTest and SubjectRelationEndpointTest

* docs: @runikaros/api-client readme

* build: gen new api-client and publish to npm center repo in @runikaros/api-client

* update: core api endpoints url

* revert: "fix: test cases run fail: SubjectEndpointTest and SubjectRelationEndpointTest"

This reverts commit fc36652.

* build: gen new api-client and publish to npm center repo in @runikaros/api-client
  • Loading branch information
chivehao committed Jun 4, 2023
1 parent 424582e commit 7c24e80
Show file tree
Hide file tree
Showing 17 changed files with 2,331 additions and 822 deletions.
31 changes: 30 additions & 1 deletion console/packages/api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,35 @@ pnpm build

## 发布版本

1. 先启动服务端

2. 生成 TS 代码

```bash
pnpm gen
```

3. `package.json` 版本 patch 号加一,
例子:从 `0.0.0` => `0.0.1`

4. 编译 TS 代码

```bash
pnpm build
```

5. npm 发布,如果未登录需要先登录

```bash
npm login
```

```bash
npm publish
```

6. git 提交

```bash
pnpm release
git commit -am "build: gen new api-client and publish to npm center repo in @runikaros/api-client"
```
4 changes: 2 additions & 2 deletions console/packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@runikaros/api-client",
"version": "0.0.3",
"version": "0.0.6",
"description": "Project ikaros console api-client package",
"type": "module",
"scripts": {
Expand All @@ -10,7 +10,7 @@
"prettier-format": "prettier --config .prettierrc.cjs \"src/**/*.{vue,js,ts}\" --write",
"typecheck": "tsc --noEmit",
"release": "bumpp",
"gen": "openapi-generator-cli generate -i http://localhost:9999/v3/api-docs/CustomOpenApi -g typescript-axios -c ./src/.openapi_config.yaml -o ./src --type-mappings='set=Array' && pnpm lint && pnpm prettier-format"
"gen": "openapi-generator-cli generate -i http://localhost:9999/v3/api-docs/AllOpenApi -g typescript-axios -c ./src/.openapi_config.yaml -o ./src --type-mappings='set=Array' && pnpm lint && pnpm prettier-format"
},
"keywords": [
"ikaros",
Expand Down
10 changes: 10 additions & 0 deletions console/packages/api-client/src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@ api.ts
api/file-ikaros-run-v1alpha1-file-policy-api.ts
api/file-ikaros-run-v1alpha1-file-setting-api.ts
api/plugin-ikaros-run-v1alpha1-plugin-api.ts
api/v1alpha1-file-api.ts
api/v1alpha1-subject-api.ts
api/v1alpha1-subject-relation-api.ts
base.ts
common.ts
configuration.ts
git_push.sh
index.ts
models/author.ts
models/episode-resource.ts
models/episode.ts
models/file-entity.ts
models/file-policy.ts
models/file-setting.ts
models/index.ts
models/model-file.ts
models/paging-wrap.ts
models/plugin.ts
models/subject-image.ts
models/subject-relation.ts
models/subject.ts
3 changes: 3 additions & 0 deletions console/packages/api-client/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@
export * from './api/file-ikaros-run-v1alpha1-file-policy-api';
export * from './api/file-ikaros-run-v1alpha1-file-setting-api';
export * from './api/plugin-ikaros-run-v1alpha1-plugin-api';
export * from './api/v1alpha1-file-api';
export * from './api/v1alpha1-subject-api';
export * from './api/v1alpha1-subject-relation-api';
Loading

0 comments on commit 7c24e80

Please sign in to comment.