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

chore(eventindexer,relayer,taiko-client): prep swagger apis to migrate #17148

Merged
merged 2 commits into from
May 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
46 changes: 0 additions & 46 deletions .github/workflows/taiko-client-proverapi-preview.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/taiko-client-proverapi-production.yml

This file was deleted.

57 changes: 7 additions & 50 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 All @@ -16,7 +16,8 @@ const docTemplate = `{
"email": "[email protected]"
},
"license": {
"name": "MIT"
"name": "MIT",
"url": "https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md"
},
"version": "{{.Version}}"
},
Expand Down Expand Up @@ -167,26 +168,6 @@ const docTemplate = `{
}
}
},
"/stats": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get stats",
"operationId": "get-stats",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/eventindexer.Stat"
}
}
}
}
},
"/uniqueProposers": {
"get": {
"consumes": [
Expand Down Expand Up @@ -251,32 +232,6 @@ const docTemplate = `{
}
}
},
"eventindexer.Stat": {
"type": "object",
"properties": {
"averageProofReward": {
"type": "string"
},
"averageProofTime": {
"type": "string"
},
"feeTokenAddress": {
"type": "string"
},
"id": {
"type": "integer"
},
"numBlocksAssigned": {
"type": "integer"
},
"numProofs": {
"type": "integer"
},
"statType": {
"type": "string"
}
}
},
"eventindexer.UniqueProposersResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -369,13 +324,15 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "eventindexer.katla.taiko.xyz",
Host: "eventindexer.hekla.taiko.xyz",
BasePath: "",
Schemes: []string{},
Title: "Taiko Eventindexer API",
Title: "Taiko Event Indexer API",
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {
Expand Down
49 changes: 4 additions & 45 deletions packages/eventindexer/docs/swagger.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"swagger": "2.0",
"info": {
"title": "Taiko Eventindexer API",
"title": "Taiko Event Indexer API",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "https://community.taiko.xyz/",
"email": "[email protected]"
},
"license": {
"name": "MIT"
"name": "MIT",
"url": "https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md"
},
"version": "1.0"
},
"host": "eventindexer.katla.taiko.xyz",
"host": "eventindexer.hekla.taiko.xyz",
"paths": {
"/assignedBlocks": {
"get": {
Expand Down Expand Up @@ -143,22 +144,6 @@
}
}
},
"/stats": {
"get": {
"consumes": ["application/json"],
"produces": ["application/json"],
"summary": "Get stats",
"operationId": "get-stats",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/eventindexer.Stat"
}
}
}
}
},
"/uniqueProposers": {
"get": {
"consumes": ["application/json"],
Expand Down Expand Up @@ -215,32 +200,6 @@
}
}
},
"eventindexer.Stat": {
"type": "object",
"properties": {
"averageProofReward": {
"type": "string"
},
"averageProofTime": {
"type": "string"
},
"feeTokenAddress": {
"type": "string"
},
"id": {
"type": "integer"
},
"numBlocksAssigned": {
"type": "integer"
},
"numProofs": {
"type": "integer"
},
"statType": {
"type": "string"
}
}
},
"eventindexer.UniqueProposersResponse": {
"type": "object",
"properties": {
Expand Down
35 changes: 3 additions & 32 deletions packages/eventindexer/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,6 @@ definitions:
$ref: "#/definitions/eventindexer.ChartItem"
type: array
type: object
eventindexer.Stat:
properties:
averageProofReward:
type: string
averageProofTime:
type: string
feeTokenAddress:
type: string
id:
type: integer
numBlocksAssigned:
type: integer
numProofs:
type: integer
statType:
type: string
type: object
eventindexer.UniqueProposersResponse:
properties:
address:
Expand Down Expand Up @@ -86,16 +69,17 @@ definitions:
visible:
type: integer
type: object
host: eventindexer.katla.taiko.xyz
host: eventindexer.hekla.taiko.xyz
info:
contact:
email: [email protected]
name: API Support
url: https://community.taiko.xyz/
license:
name: MIT
url: https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md
termsOfService: http://swagger.io/terms/
title: Taiko Eventindexer API
title: Taiko Event Indexer API
version: "1.0"
paths:
/assignedBlocks:
Expand Down Expand Up @@ -194,19 +178,6 @@ paths:
schema:
$ref: "#/definitions/paginate.Page"
summary: Get nft balances by address and chain ID
/stats:
get:
consumes:
- application/json
operationId: get-stats
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: "#/definitions/eventindexer.Stat"
summary: Get stats
/uniqueProposers:
get:
consumes:
Expand Down
5 changes: 3 additions & 2 deletions packages/eventindexer/pkg/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
echo "github.com/labstack/echo/v4"
)

// @title Taiko Eventindexer API
// @title Taiko Event Indexer API
// @version 1.0
// @termsOfService http://swagger.io/terms/

Expand All @@ -23,8 +23,9 @@ import (
// @contact.email [email protected]

// @license.name MIT
// @license.url https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md

// @host eventindexer.katla.taiko.xyz
// @host eventindexer.hekla.taiko.xyz
// Server represents an eventindexer http server instance.
type Server struct {
echo *echo.Echo
Expand Down
13 changes: 10 additions & 3 deletions packages/relayer/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const docTemplate = `{
"email": "[email protected]"
},
"license": {
"name": "MIT"
"name": "MIT",
"url": "https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md"
},
"version": "{{.Version}}"
},
Expand Down Expand Up @@ -126,6 +127,12 @@ const docTemplate = `{
"paginate.Page": {
"type": "object",
"properties": {
"error": {
"type": "boolean"
},
"error_message": {
"type": "string"
},
"first": {
"type": "boolean"
},
Expand Down Expand Up @@ -159,10 +166,10 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "relayer.katla.taiko.xyz",
Host: "relayer.hekla.taiko.xyz",
BasePath: "",
Schemes: []string{},
Title: "Taiko Relayer API",
Title: "Taiko Bridge Relayer API",
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
Expand Down
Loading
Loading