Skip to content

feat(apis): optional structured requestLimits column (DBIP #3724, tools side) - #3738

Open
foxxx009 wants to merge 1 commit into
Chain-Love:json-toolsfrom
foxxx009:dbip-3724-apis-requestlimits-tools
Open

feat(apis): optional structured requestLimits column (DBIP #3724, tools side)#3738
foxxx009 wants to merge 1 commit into
Chain-Love:json-toolsfrom
foxxx009:dbip-3724-apis-requestlimits-tools

Conversation

@foxxx009

@foxxx009 foxxx009 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Tools-side implementation of DBIP #3724 (data PR: #3737).

Changes (by file)

  • tools/schema.json: optional apis.requestLimits - array of objects with exact keys method, transport (http|websocket), metric (batchRequests|blockSpan), maximum (positive integer), sourceUrl; additionalProperties: false. Optional, so existing rows without the column stay valid.
  • meta/columns.json: requestLimits metadata (arrayPopover, capabilities group, documented blank-means-unverified semantics).
  • tools/csv_to_json.py: validate_request_limits() run on canonical offers once and on resolved apis listings per network. Enforces: exact key set, enum transports/metrics, positive integer maximum (no 0 sentinel, no guessed unlimited), http(s) sourceUrl, and (method, transport, metric) uniqueness within one row. Blank/None always valid.

Acceptance

  • JSON shape, integer positivity, allowed metrics/transports validated
  • (method, transport, metric) uniqueness enforced
  • Optionality preserved for old rows (current repo data passes unchanged)
  • Structured values preserved in generated JSON

Validation run locally

  • csv_to_json.py exit 0 on current data (schemaVersion 2.0.0 generated for all 155 networks)
  • validate.py green against the updated schema
  • Negative cases rejected with per-row messages: duplicate (method, transport, metric) tuple, maximum: 0, transport: "smtp", metric: "rateLimit", non-URL sourceUrl

Rewards address: 0x2409b47a530be3831158f10b08ac93f7d08c1ff2

…ck span)

DBIP Chain-Love#3724 implementation on the tools side:

- schema.json: optional apis property requestLimits — array of objects
  {method, transport(http|websocket), metric(batchRequests|blockSpan),
  maximum(positive int), sourceUrl}; additionalProperties false; optional
  so existing rows stay valid.
- meta/columns.json: requestLimits metadata (arrayPopover, capabilities).
- csv_to_json.py: validate_request_limits() run once on canonical offers
  and per network on resolved apis listings — enforces exact key set,
  enum transports/metrics, positive integer maximum, http(s) sourceUrl
  and (method, transport, metric) uniqueness. Blank/None stays valid:
  blank means unverified, no 0 sentinel or guessed unlimited.

Local run: csv_to_json.py exit 0 on current data; validate.py green;
negative cases (duplicate tuple, maximum 0, bad transport/metric/url)
all rejected with per-row messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant