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

fix(docs): add body to api req #432

Merged
merged 3 commits into from
Oct 19, 2023
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
48 changes: 48 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ const docTemplate = `{
],
"summary": "Try to accept a block proof assignment",
"operationId": "create-assignment",
"parameters": [
{
"description": "assignment request body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/prover_server.CreateAssignmentRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -72,6 +83,43 @@ const docTemplate = `{
}
},
"definitions": {
"big.Int": {
"type": "object"
},
"github_com_taikoxyz_taiko-client_bindings_encoding.TierFee": {
"type": "object",
"properties": {
"fee": {
"$ref": "#/definitions/big.Int"
},
"tier": {
"type": "integer"
}
}
},
"prover_server.CreateAssignmentRequestBody": {
"type": "object",
"properties": {
"expiry": {
"type": "integer"
},
"feeToken": {
"type": "string"
},
"tierFees": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_taikoxyz_taiko-client_bindings_encoding.TierFee"
}
},
"txListHash": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"prover_server.ProposeBlockResponse": {
"type": "object",
"properties": {
Expand Down
48 changes: 48 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
],
"summary": "Try to accept a block proof assignment",
"operationId": "create-assignment",
"parameters": [
{
"description": "assignment request body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/prover_server.CreateAssignmentRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -63,6 +74,43 @@
}
},
"definitions": {
"big.Int": {
"type": "object"
},
"github_com_taikoxyz_taiko-client_bindings_encoding.TierFee": {
"type": "object",
"properties": {
"fee": {
"$ref": "#/definitions/big.Int"
},
"tier": {
"type": "integer"
}
}
},
"prover_server.CreateAssignmentRequestBody": {
"type": "object",
"properties": {
"expiry": {
"type": "integer"
},
"feeToken": {
"type": "string"
},
"tierFees": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_taikoxyz_taiko-client_bindings_encoding.TierFee"
}
},
"txListHash": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"prover_server.ProposeBlockResponse": {
"type": "object",
"properties": {
Expand Down
31 changes: 31 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
definitions:
big.Int:
type: object
github_com_taikoxyz_taiko-client_bindings_encoding.TierFee:
properties:
fee:
$ref: '#/definitions/big.Int'
tier:
type: integer
type: object
prover_server.CreateAssignmentRequestBody:
properties:
expiry:
type: integer
feeToken:
type: string
tierFees:
items:
$ref: '#/definitions/github_com_taikoxyz_taiko-client_bindings_encoding.TierFee'
type: array
txListHash:
items:
type: integer
type: array
type: object
prover_server.ProposeBlockResponse:
properties:
prover:
Expand Down Expand Up @@ -38,6 +62,13 @@ paths:
consumes:
- application/json
operationId: create-assignment
parameters:
- description: assignment request body
in: body
name: body
required: true
schema:
$ref: '#/definitions/prover_server.CreateAssignmentRequestBody'
produces:
- application/json
responses:
Expand Down
2 changes: 1 addition & 1 deletion prover/server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type ProposeBlockResponse struct {
// can submit onchain.
//
// @Summary Try to accept a block proof assignment
// @ID create-assignment
// @Param body body CreateAssignmentRequestBody true "assignment request body"
// @Accept json
// @Produce json
// @Success 200 {object} ProposeBlockResponse
Expand Down