Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerLamTd committed Oct 16, 2023
1 parent 0ffb59d commit 2024139
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 23 deletions.
21 changes: 13 additions & 8 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const docTemplate = `{
"email": "[email protected]"
},
"license": {
"name": "MIT",
"url": "hhttps://github.com/taikoxyz/taiko-client/blob/main/LICENSE.md"
"name": "MIT"
},
"version": "{{.Version}}"
},
Expand All @@ -38,7 +37,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/server.ProposeBlockResponse"
"$ref": "#/definitions/prover_server.ProposeBlockResponse"
}
},
"422": {
Expand All @@ -64,15 +63,15 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/server.Status"
"$ref": "#/definitions/prover_server.Status"
}
}
}
}
}
},
"definitions": {
"server.ProposeBlockResponse": {
"prover_server.ProposeBlockResponse": {
"type": "object",
"properties": {
"prover": {
Expand All @@ -86,7 +85,7 @@ const docTemplate = `{
}
}
},
"server.Status": {
"prover_server.Status": {
"type": "object",
"properties": {
"currentCapacity": {
Expand All @@ -95,7 +94,13 @@ const docTemplate = `{
"maxExpiry": {
"type": "integer"
},
"minProofFee": {
"minOptimisticTierFee": {
"type": "integer"
},
"minPseZkevmTierFee": {
"type": "integer"
},
"minSgxTierFee": {
"type": "integer"
}
}
Expand All @@ -106,7 +111,7 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "prover-api.test.taiko.xyz",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "Taiko Prover API",
Expand Down
20 changes: 12 additions & 8 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
"email": "[email protected]"
},
"license": {
"name": "MIT",
"url": "hhttps://github.com/taikoxyz/taiko-client/blob/main/LICENSE.md"
"name": "MIT"
},
"version": "1.0"
},
"host": "prover-api.test.taiko.xyz",
"paths": {
"/assignment": {
"post": {
Expand All @@ -30,7 +28,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/server.ProposeBlockResponse"
"$ref": "#/definitions/prover_server.ProposeBlockResponse"
}
},
"422": {
Expand All @@ -56,15 +54,15 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/server.Status"
"$ref": "#/definitions/prover_server.Status"
}
}
}
}
}
},
"definitions": {
"server.ProposeBlockResponse": {
"prover_server.ProposeBlockResponse": {
"type": "object",
"properties": {
"prover": {
Expand All @@ -78,7 +76,7 @@
}
}
},
"server.Status": {
"prover_server.Status": {
"type": "object",
"properties": {
"currentCapacity": {
Expand All @@ -87,7 +85,13 @@
"maxExpiry": {
"type": "integer"
},
"minProofFee": {
"minOptimisticTierFee": {
"type": "integer"
},
"minPseZkevmTierFee": {
"type": "integer"
},
"minSgxTierFee": {
"type": "integer"
}
}
Expand Down
16 changes: 9 additions & 7 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
definitions:
server.ProposeBlockResponse:
prover_server.ProposeBlockResponse:
properties:
prover:
type: string
Expand All @@ -8,24 +8,26 @@ definitions:
type: integer
type: array
type: object
server.Status:
prover_server.Status:
properties:
currentCapacity:
type: integer
maxExpiry:
type: integer
minProofFee:
minOptimisticTierFee:
type: integer
minPseZkevmTierFee:
type: integer
minSgxTierFee:
type: integer
type: object
host: prover-api.test.taiko.xyz
info:
contact:
email: [email protected]
name: API Support
url: https://community.taiko.xyz/
license:
name: MIT
url: hhttps://github.com/taikoxyz/taiko-client/blob/main/LICENSE.md
termsOfService: http://swagger.io/terms/
title: Taiko Prover API
version: "1.0"
Expand All @@ -41,7 +43,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/server.ProposeBlockResponse'
$ref: '#/definitions/prover_server.ProposeBlockResponse'
"422":
description: prover does not have capacity
schema:
Expand All @@ -58,6 +60,6 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/server.Status'
$ref: '#/definitions/prover_server.Status'
summary: Get current prover server status
swagger: "2.0"
10 changes: 10 additions & 0 deletions prover/server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ import (
"github.com/taikoxyz/taiko-client/pkg/rpc"
)

// @title Taiko Prover API
// @version 1.0
// @termsOfService http://swagger.io/terms/

// @contact.name API Support
// @contact.url https://community.taiko.xyz/
// @contact.email [email protected]

// @license.name MIT

// CreateAssignmentRequestBody represents a request body when handling assignment creation request.
type CreateAssignmentRequestBody struct {
FeeToken common.Address
Expand Down

0 comments on commit 2024139

Please sign in to comment.