Skip to content

Commit

Permalink
docs(repo): update swagger scripts and api docs for relayer and event…
Browse files Browse the repository at this point in the history
…indexer (#15755)

Co-authored-by: d1onys1us <[email protected]>
  • Loading branch information
RogerLamTd and dionysuzx authored Feb 14, 2024
1 parent 365b604 commit a19922d
Show file tree
Hide file tree
Showing 14 changed files with 648 additions and 482 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
2 changes: 1 addition & 1 deletion packages/eventindexer/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
window.onload = function () {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: "docs/swagger.json", //Location of Open API spec in the repo
url: "/swagger.json", //Location of Open API spec in the repo
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
Expand Down
Loading

0 comments on commit a19922d

Please sign in to comment.