Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(repo): update swagger scripts and api docs for relayer and eventindexer #15755

Merged
merged 6 commits into from
Feb 14, 2024
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
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
Loading