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

fix(docs): update swagger #761

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .swaggo
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
replace common.Address string
replace encoding.TierFee uint64
32 changes: 12 additions & 20 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,36 +82,25 @@ const docTemplate = `{
}
},
"definitions": {
"big.Int": {
"type": "object"
},
"encoding.TierFee": {
"type": "object",
"properties": {
"fee": {
"$ref": "#/definitions/big.Int"
},
"tier": {
"type": "integer"
}
}
},
"server.CreateAssignmentRequestBody": {
"type": "object",
"properties": {
"blobHash": {
"type": "array",
"items": {
"type": "integer"
}
},
"expiry": {
"type": "integer"
},
"feeToken": {
"type": "string"
},
"tierFees": {
"type": "array",
"items": {
"$ref": "#/definitions/encoding.TierFee"
}
"proposer": {
"type": "string"
},
"txListHash": {
"tierFees": {
"type": "array",
"items": {
"type": "integer"
Expand Down Expand Up @@ -148,6 +137,9 @@ const docTemplate = `{
"minOptimisticTierFee": {
"type": "integer"
},
"minSgxAndZkVMTierFee": {
"type": "integer"
},
"minSgxTierFee": {
"type": "integer"
},
Expand Down
32 changes: 12 additions & 20 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,36 +73,25 @@
}
},
"definitions": {
"big.Int": {
"type": "object"
},
"encoding.TierFee": {
"type": "object",
"properties": {
"fee": {
"$ref": "#/definitions/big.Int"
},
"tier": {
"type": "integer"
}
}
},
"server.CreateAssignmentRequestBody": {
"type": "object",
"properties": {
"blobHash": {
"type": "array",
"items": {
"type": "integer"
}
},
"expiry": {
"type": "integer"
},
"feeToken": {
"type": "string"
},
"tierFees": {
"type": "array",
"items": {
"$ref": "#/definitions/encoding.TierFee"
}
"proposer": {
"type": "string"
},
"txListHash": {
"tierFees": {
"type": "array",
"items": {
"type": "integer"
Expand Down Expand Up @@ -139,6 +128,9 @@
"minOptimisticTierFee": {
"type": "integer"
},
"minSgxAndZkVMTierFee": {
"type": "integer"
},
"minSgxTierFee": {
"type": "integer"
},
Expand Down
21 changes: 8 additions & 13 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
definitions:
big.Int:
type: object
encoding.TierFee:
properties:
fee:
$ref: '#/definitions/big.Int'
tier:
type: integer
type: object
server.CreateAssignmentRequestBody:
properties:
blobHash:
items:
type: integer
type: array
expiry:
type: integer
feeToken:
type: string
proposer:
type: string
tierFees:
items:
$ref: '#/definitions/encoding.TierFee'
type: array
txListHash:
items:
type: integer
type: array
Expand All @@ -42,6 +35,8 @@ definitions:
type: integer
minOptimisticTierFee:
type: integer
minSgxAndZkVMTierFee:
type: integer
minSgxTierFee:
type: integer
prover:
Expand Down
12 changes: 6 additions & 6 deletions prover/server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const (

// CreateAssignmentRequestBody represents a request body when handling assignment creation request.
type CreateAssignmentRequestBody struct {
Proposer common.Address
FeeToken common.Address
TierFees []encoding.TierFee
Expiry uint64
BlobHash common.Hash
Proposer common.Address `json:"proposer"`
FeeToken common.Address `json:"feeToken"`
TierFees []encoding.TierFee `json:"tierFees"`
Expiry uint64 `json:"expiry"`
BlobHash common.Hash `json:"blobHash"`
}

// Status represents the current prover server status.
Expand Down Expand Up @@ -82,7 +82,7 @@ type ProposeBlockResponse struct {
// can submit onchain.
//
// @Summary Try to accept a block proof assignment
// @Param body CreateAssignmentRequestBody true "assignment request body"
// @Param body body server.CreateAssignmentRequestBody true "assignment request body"
// @Accept json
// @Produce json
// @Success 200 {object} ProposeBlockResponse
Expand Down
Loading