Skip to content
Open
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
183 changes: 183 additions & 0 deletions APIs/openchainbench.com/1.0.0/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
openapi: 3.1.0
info:
contact:
email: contact@openchainbench.com
name: OpenChainBench
url: https://openchainbench.com
description: Open, reproducible benchmarks for crypto infrastructure including RPC providers, oracles, bridges, L1 finality, and prediction markets. Daily Parquet snapshots and a Zenodo DOI for citations.
license:
name: CC-BY-4.0
url: https://creativecommons.org/licenses/by/4.0/
title: OpenChainBench API
version: "1.0.0"
x-apisguru-categories:
- open_data
- analytics
x-logo:
url: https://openchainbench.com/logo.png
x-origin:
- format: openapi
url: https://openchainbench.com/api/openapi.json
version: "3.1"
x-providerName: openchainbench.com
servers:
- url: https://openchainbench.com
paths:
/api/citable:
get:
summary: Flat index of every citable benchmark with current values.
operationId: list_benchmarks
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/CitableIndex"
/api/stat/{slug}:
get:
summary: Single benchmark with rankings, sparkline, and a ready-to-paste citation.
operationId: get_benchmark
parameters:
- name: slug
in: path
required: true
schema:
type: string
description: Benchmark slug (e.g. 'aggregator-head-lag').
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Stat"
"404":
description: Unknown slug
/api/og/{slug}:
get:
summary: Watermarked 1200x630 PNG showing the current value and sparkline.
operationId: get_og_image
parameters:
- name: slug
in: path
required: true
schema:
type: string
responses:
"200":
description: PNG
content:
image/png: {}
"404":
description: Unknown slug
components:
schemas:
CitableIndex:
type: object
properties:
site:
type: object
count:
type: integer
benchmarks:
type: array
items:
$ref: "#/components/schemas/CitableRow"
CitableRow:
type: object
properties:
slug:
type: string
title:
type: string
metric:
type: string
unit:
type: string
value:
type:
- number
- "null"
headline:
type: string
url:
type: string
format: uri
api:
type: string
format: uri
ogImage:
type: string
format: uri
asOf:
type: string
format: date-time
Stat:
type: object
properties:
slug:
type: string
title:
type: string
value:
type:
- number
- "null"
unit:
type: string
rankings:
type: array
Comment on lines +129 to +130

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The rankings property is defined as type: array but is missing the items keyword. In OpenAPI/JSON Schema, array types should specify the schema of their items. If the items can be of any type, you can use an empty object items: {}.

        rankings:
          type: array
          items: {}

items:
$ref: "#/components/schemas/Ranking"
sparkline:
type: array
items:
type: number
headline:
type: string
quote:
type: string
pageUrl:
type: string
format: uri
asOf:
type: string
format: date-time
Ranking:
type: object
properties:
name:
type: string
slug:
type: string
ms:
type: object
properties:
p50:
type: number
p90:
type: number
p99:
type: number
mean:
type: number
successRate:
type: number
sampleSize:
type:
- integer
- "null"
sampleHealth:
type:
- number
- "null"
dataConfidence:
type:
- string
- "null"
enum:
- healthy
- low
- insufficient
- null