Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: swagger update #8

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading