-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6af2dc5
commit 0d7f8f0
Showing
3 changed files
with
218 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,8 @@ jobs: | |
- name: Test | ||
run: go test -v ./... | ||
- name: Swagger | ||
run: | | ||
go install github.com/swaggo/swag/cmd/swag@latest | ||
swag init -g ./cmd/server/main.go | ||
git config user.name devops | ||
git config suer.email [email protected] | ||
git add ./docs | ||
git commit -m "swagger updated" | ||
git push | ||
run: chmod +x ./.github/scripts/auto-swagger.sh && ./.github/scripts/auto-swagger.sh | ||
|
||
|
||
|
||
name: Building And Testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"contact": { | ||
"name": "AAStar Support", | ||
"url": "https://aastar.xyz" | ||
} | ||
}, | ||
"paths": { | ||
"/api/auth": { | ||
"post": { | ||
"description": "Get AccessToken By ApiKey", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Auth" | ||
], | ||
"parameters": [ | ||
{ | ||
"description": "AccessToken Model", | ||
"name": "credential", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/models.ClientCredential" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/healthz": { | ||
"get": { | ||
"description": "Get Healthz", | ||
"tags": [ | ||
"Healthz" | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/v1/get-support-entrypoint": { | ||
"get": { | ||
"security": [ | ||
{ | ||
"JWT": [] | ||
} | ||
], | ||
"description": "get the support entrypoint", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Sponsor" | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/v1/get-support-strategy": { | ||
"get": { | ||
"security": [ | ||
{ | ||
"JWT": [] | ||
} | ||
], | ||
"description": "get the support strategy", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Sponsor" | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/v1/try-pay-user-operation": { | ||
"post": { | ||
"security": [ | ||
{ | ||
"JWT": [] | ||
} | ||
], | ||
"description": "sponsor the userOp", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Sponsor" | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"models.ClientCredential": { | ||
"type": "object", | ||
"properties": { | ||
"apiKey": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"JWT": { | ||
"description": "Type 'Bearer \\\u003cTOKEN\\\u003e' to correctly set the AccessToken", | ||
"type": "apiKey", | ||
"name": "Authorization", | ||
"in": "header" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
definitions: | ||
models.ClientCredential: | ||
properties: | ||
apiKey: | ||
type: string | ||
type: object | ||
info: | ||
contact: | ||
name: AAStar Support | ||
url: https://aastar.xyz | ||
paths: | ||
/api/auth: | ||
post: | ||
consumes: | ||
- application/json | ||
description: Get AccessToken By ApiKey | ||
parameters: | ||
- description: AccessToken Model | ||
in: body | ||
name: credential | ||
required: true | ||
schema: | ||
$ref: '#/definitions/models.ClientCredential' | ||
responses: | ||
"200": | ||
description: OK | ||
tags: | ||
- Auth | ||
/api/healthz: | ||
get: | ||
description: Get Healthz | ||
responses: | ||
"200": | ||
description: OK | ||
tags: | ||
- Healthz | ||
/api/v1/get-support-entrypoint: | ||
get: | ||
consumes: | ||
- application/json | ||
description: get the support entrypoint | ||
responses: | ||
"200": | ||
description: OK | ||
security: | ||
- JWT: [] | ||
tags: | ||
- Sponsor | ||
/api/v1/get-support-strategy: | ||
get: | ||
consumes: | ||
- application/json | ||
description: get the support strategy | ||
produces: | ||
- application/json | ||
responses: | ||
"200": | ||
description: OK | ||
security: | ||
- JWT: [] | ||
tags: | ||
- Sponsor | ||
/api/v1/try-pay-user-operation: | ||
post: | ||
consumes: | ||
- application/json | ||
description: sponsor the userOp | ||
responses: | ||
"200": | ||
description: OK | ||
security: | ||
- JWT: [] | ||
tags: | ||
- Sponsor | ||
securityDefinitions: | ||
JWT: | ||
description: Type 'Bearer \<TOKEN\>' to correctly set the AccessToken | ||
in: header | ||
name: Authorization | ||
type: apiKey | ||
swagger: "2.0" |