Skip to content

Commit

Permalink
Merge pull request #8 from AAStarCommunity/chao/chore-swagger-gen
Browse files Browse the repository at this point in the history
chore: swagger update
  • Loading branch information
fanhousanbu committed Mar 3, 2024
2 parents 7ea0098 + ab0cb73 commit e98c323
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 20 deletions.
34 changes: 26 additions & 8 deletions docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Package docs Code generated by swaggo/swag. DO NOT EDIT
// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
Expand All @@ -15,12 +16,31 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/api/v1/sponsor-user-operation": {
"post": {
"description": "sponsor the userOp",
"/api/v1/get-support-entrypoint": {
"get": {
"description": "get the support entrypoint",
"consumes": [
"application/json"
],
"tags": [
"Sponsor"
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/get-support-strategy": {
"get": {
"description": "get the support strategy",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Sponsor"
],
Expand All @@ -31,9 +51,9 @@ const docTemplate = `{
}
}
},
"/api/v1/validate-user-operation": {
"/api/v1/try-pay-user-operation": {
"post": {
"description": "validate the userOp for sponsor",
"description": "sponsor the userOp",
"consumes": [
"application/json"
],
Expand All @@ -60,8 +80,6 @@ var SwaggerInfo = &swag.Spec{
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {
Expand Down
29 changes: 24 additions & 5 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,31 @@
"contact": {}
},
"paths": {
"/api/v1/sponsor-user-operation": {
"post": {
"description": "sponsor the userOp",
"/api/v1/get-support-entrypoint": {
"get": {
"description": "get the support entrypoint",
"consumes": [
"application/json"
],
"tags": [
"Sponsor"
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/get-support-strategy": {
"get": {
"description": "get the support strategy",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Sponsor"
],
Expand All @@ -20,9 +39,9 @@
}
}
},
"/api/v1/validate-user-operation": {
"/api/v1/try-pay-user-operation": {
"post": {
"description": "validate the userOp for sponsor",
"description": "sponsor the userOp",
"consumes": [
"application/json"
],
Expand Down
22 changes: 17 additions & 5 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
info:
contact: {}
paths:
/api/v1/sponsor-user-operation:
post:
/api/v1/get-support-entrypoint:
get:
consumes:
- application/json
description: sponsor the userOp
description: get the support entrypoint
responses:
"200":
description: OK
tags:
- Sponsor
/api/v1/validate-user-operation:
/api/v1/get-support-strategy:
get:
consumes:
- application/json
description: get the support strategy
produces:
- application/json
responses:
"200":
description: OK
tags:
- Sponsor
/api/v1/try-pay-user-operation:
post:
consumes:
- application/json
description: validate the userOp for sponsor
description: sponsor the userOp
responses:
"200":
description: OK
Expand Down
2 changes: 1 addition & 1 deletion rpc_server/api/v1/get_support_entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// @Accept json
// @Product json
// @Router /api/v1/get-support-entrypoint [get]
// @Success 200 {object} gin.H
// @Success 200
func GetSupportEntrypoint(c *gin.Context) {
//1.TODO API validate
//2. recall service
Expand Down
2 changes: 1 addition & 1 deletion rpc_server/api/v1/get_support_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// @Description get the support strategy
// @Accept json
// @Produce json
// @Success 200 {object} gin.H
// @Success 200
// @Router /api/v1/get-support-strategy [get]
func GetSupportStrategy(c *gin.Context) {
//1.TODO API validate
Expand Down

0 comments on commit e98c323

Please sign in to comment.