Skip to content

Commit

Permalink
swag
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 committed Sep 19, 2024
1 parent f3a2698 commit 111b3da
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 217 deletions.
140 changes: 59 additions & 81 deletions service/account/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ const docTemplate = `{
"Account"
],
"summary": "Get user account",
"parameters": [
{
"description": "auth request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.Auth"
}
}
],
"responses": {
"200": {
"description": "successfully retrieved user account",
Expand All @@ -67,62 +56,6 @@ const docTemplate = `{
}
}
},
"/account/v1alpha1/basic-cost-distribution": {
"post": {
"description": "Get basic cost distribution",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BasicCostDistribution"
],
"summary": "Get basic cost distribution",
"parameters": [
{
"description": "Basic cost distribution request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.GetCostAppListReq"
}
}
],
"responses": {
"200": {
"description": "successfully get basic cost distribution",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "failed to parse basic cost distribution request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"401": {
"description": "authenticate error",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "failed to get basic cost distribution",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/account/v1alpha1/check-permission": {
"post": {
"description": "Check permission",
Expand All @@ -136,17 +69,6 @@ const docTemplate = `{
"Permission"
],
"summary": "Check permission",
"parameters": [
{
"description": "Check permission request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.UserBaseReq"
}
}
],
"responses": {
"200": {
"description": "successfully check permission",
Expand Down Expand Up @@ -321,6 +243,62 @@ const docTemplate = `{
}
}
},
"/account/v1alpha1/cost-basic-distribution": {
"post": {
"description": "Get basic cost distribution",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BasicCostDistribution"
],
"summary": "Get basic cost distribution",
"parameters": [
{
"description": "Basic cost distribution request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.GetCostAppListReq"
}
}
],
"responses": {
"200": {
"description": "successfully get basic cost distribution",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "failed to parse basic cost distribution request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"401": {
"description": "authenticate error",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "failed to get basic cost distribution",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/account/v1alpha1/cost-overview": {
"post": {
"description": "Get cost overview",
Expand Down Expand Up @@ -676,7 +654,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.UserBaseReq"
"$ref": "#/definitions/helper.UserTimeRangeReq"
}
}
],
Expand Down Expand Up @@ -732,7 +710,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.UserBaseReq"
"$ref": "#/definitions/helper.UserTimeRangeReq"
}
}
],
Expand Down Expand Up @@ -2085,7 +2063,7 @@ const docTemplate = `{
}
}
},
"helper.UserBaseReq": {
"helper.UserTimeRangeReq": {
"type": "object",
"properties": {
"endTime": {
Expand Down
140 changes: 59 additions & 81 deletions service/account/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@
"Account"
],
"summary": "Get user account",
"parameters": [
{
"description": "auth request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.Auth"
}
}
],
"responses": {
"200": {
"description": "successfully retrieved user account",
Expand All @@ -60,62 +49,6 @@
}
}
},
"/account/v1alpha1/basic-cost-distribution": {
"post": {
"description": "Get basic cost distribution",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BasicCostDistribution"
],
"summary": "Get basic cost distribution",
"parameters": [
{
"description": "Basic cost distribution request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.GetCostAppListReq"
}
}
],
"responses": {
"200": {
"description": "successfully get basic cost distribution",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "failed to parse basic cost distribution request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"401": {
"description": "authenticate error",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "failed to get basic cost distribution",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/account/v1alpha1/check-permission": {
"post": {
"description": "Check permission",
Expand All @@ -129,17 +62,6 @@
"Permission"
],
"summary": "Check permission",
"parameters": [
{
"description": "Check permission request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.UserBaseReq"
}
}
],
"responses": {
"200": {
"description": "successfully check permission",
Expand Down Expand Up @@ -314,6 +236,62 @@
}
}
},
"/account/v1alpha1/cost-basic-distribution": {
"post": {
"description": "Get basic cost distribution",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"BasicCostDistribution"
],
"summary": "Get basic cost distribution",
"parameters": [
{
"description": "Basic cost distribution request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.GetCostAppListReq"
}
}
],
"responses": {
"200": {
"description": "successfully get basic cost distribution",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "failed to parse basic cost distribution request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"401": {
"description": "authenticate error",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "failed to get basic cost distribution",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/account/v1alpha1/cost-overview": {
"post": {
"description": "Get cost overview",
Expand Down Expand Up @@ -669,7 +647,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.UserBaseReq"
"$ref": "#/definitions/helper.UserTimeRangeReq"
}
}
],
Expand Down Expand Up @@ -725,7 +703,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/helper.UserBaseReq"
"$ref": "#/definitions/helper.UserTimeRangeReq"
}
}
],
Expand Down Expand Up @@ -2078,7 +2056,7 @@
}
}
},
"helper.UserBaseReq": {
"helper.UserTimeRangeReq": {
"type": "object",
"properties": {
"endTime": {
Expand Down
Loading

0 comments on commit 111b3da

Please sign in to comment.