Skip to content

Commit

Permalink
Merge pull request #61 from EigenExplorer/update-api
Browse files Browse the repository at this point in the history
minor error fixes for restaking metrics route
  • Loading branch information
velvety-cc authored May 15, 2024
2 parents 58a7140 + 4036a09 commit 77c991b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
14 changes: 3 additions & 11 deletions packages/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,9 @@
"type": "object",
"properties": {
"tvl": {
"type": "object",
"properties": {
"tvl": {
"type": "number",
"example": 1000000
}
},
"required": [
"tvl"
],
"description": "The value of the combined restaking strategies TVL in ETH"
"type": "number",
"description": "The value of the combined restaking strategy TVL in ETH",
"example": 1000000
},
"tvlStrategies": {
"type": "object",
Expand Down
9 changes: 5 additions & 4 deletions packages/openapi/src/routes/metrics/getTvlRestaking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import { TvlResponseSchema } from '../../apiResponseSchema/metrics/tvlResponse';
import z from '../../../../api/src/schema/zod';
import { StrategyTvlSchema } from '../../apiResponseSchema/base/strategyTvlResponse';

const RestakingTvlResponseSchema = z.object({
tvl: TvlResponseSchema.describe(
'The value of the combined restaking strategies TVL in ETH'
),
const RestakingTvlResponseSchema = TvlResponseSchema.extend({
tvl: z
.number()
.describe('The value of the combined restaking strategy TVL in ETH')
.openapi({ example: 1000000 }),
tvlStrategies: StrategyTvlSchema,
});

Expand Down

0 comments on commit 77c991b

Please sign in to comment.