Skip to content

Commit

Permalink
fix: fix ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
asjdf committed Sep 15, 2023
1 parent 515313b commit 2b915f7
Show file tree
Hide file tree
Showing 15 changed files with 3,251 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
github_token: ${{ github.token }}
- uses: bufbuild/[email protected]
with:
against: buf.build/bufbuild/buf
against: 'https://github.com/juanjiTech/jTerm-proto.git#branch=main'
buf_token: ${{ secrets.BUF_TOKEN }}
generate:
runs-on: ubuntu-latest
Expand All @@ -35,10 +35,12 @@ jobs:
- breaking
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- run: go install github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- run: rm -rf ./gen && buf generate
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "update: generate new sdk"
- run: rm -rf ./gen && buf generate && go mod tidy
- uses: stefanzweifel/git-auto-commit-action@v4
219 changes: 219 additions & 0 deletions gen/openapi/auth/v1/auth_service.swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
{
"swagger": "2.0",
"info": {
"title": "auth/v1/auth_service.proto",
"version": "version not set"
},
"tags": [
{
"name": "AuthService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/gapi/auth/v1/login": {
"post": {
"summary": "用户登录",
"operationId": "AuthService_Login",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1LoginResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1LoginRequest"
}
}
],
"tags": [
"AuthService"
]
}
},
"/gapi/auth/v1/refreshToken": {
"post": {
"summary": "Token刷新",
"operationId": "AuthService_RefreshToken",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1RefreshTokenResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1RefreshTokenRequest"
}
}
],
"tags": [
"AuthService"
]
}
},
"/gapi/auth/v1/register": {
"post": {
"summary": "用户注册",
"operationId": "AuthService_Register",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1RegisterResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1RegisterRequest"
}
}
],
"tags": [
"AuthService"
]
}
}
},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v1LoginRequest": {
"type": "object",
"properties": {
"username": {
"type": "string",
"title": "账户 可为手机号或邮箱"
},
"password": {
"type": "string"
},
"twoFactorAuth": {
"type": "string"
}
}
},
"v1LoginResponse": {
"type": "object",
"properties": {
"accessToken": {
"type": "string"
},
"refreshToken": {
"type": "string"
}
}
},
"v1RefreshTokenRequest": {
"type": "object",
"properties": {
"refreshToken": {
"type": "string"
}
}
},
"v1RefreshTokenResponse": {
"type": "object",
"properties": {
"accessToken": {
"type": "string"
},
"refreshToken": {
"type": "string"
}
}
},
"v1RegisterRequest": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"verifyCode": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"v1RegisterResponse": {
"type": "object",
"properties": {
"accessToken": {
"type": "string"
},
"refreshToken": {
"type": "string"
}
}
}
}
}
44 changes: 44 additions & 0 deletions gen/openapi/user/v1/user.swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"swagger": "2.0",
"info": {
"title": "user/v1/user.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
}
}
}
Loading

0 comments on commit 2b915f7

Please sign in to comment.