Skip to content

Commit

Permalink
docs(repo): update swagger scripts and docs for relayer and eventindexer
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerLamTd committed Feb 12, 2024
1 parent e3fde54 commit b532afd
Show file tree
Hide file tree
Showing 9 changed files with 633 additions and 480 deletions.
67 changes: 60 additions & 7 deletions packages/eventindexer/docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by swaggo/swag. DO NOT EDIT
// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs

import "github.com/swaggo/swag"
Expand Down Expand Up @@ -52,6 +52,35 @@ const docTemplate = `{
}
}
},
"/chartByTask": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get time series data for displaying charts",
"operationId": "get-charts-by-task",
"parameters": [
{
"type": "string",
"description": "task to query",
"name": "task",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/eventindexer.ChartResponse"
}
}
}
}
},
"/events": {
"get": {
"consumes": [
Expand Down Expand Up @@ -186,6 +215,28 @@ const docTemplate = `{
}
},
"definitions": {
"eventindexer.ChartItem": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"eventindexer.ChartResponse": {
"type": "object",
"properties": {
"chart": {
"type": "array",
"items": {
"$ref": "#/definitions/eventindexer.ChartItem"
}
}
}
},
"eventindexer.Stat": {
"type": "object",
"properties": {
Expand All @@ -195,20 +246,20 @@ const docTemplate = `{
"averageProofTime": {
"type": "string"
},
"averageProposerReward": {
"feeTokenAddress": {
"type": "string"
},
"id": {
"type": "integer"
},
"numProofs": {
"numBlocksAssigned": {
"type": "integer"
},
"numProposerRewards": {
"numProofs": {
"type": "integer"
},
"numVerifiedBlocks": {
"type": "integer"
"statType": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -298,13 +349,15 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "eventindexer.jolnir.taiko.xyz",
Host: "eventindexer.katla.taiko.xyz",
BasePath: "",
Schemes: []string{},
Title: "Taiko Eventindexer API",
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {
Expand Down
Loading

0 comments on commit b532afd

Please sign in to comment.