Skip to content

chore: generate v0 JSON RPC specification#13155

Merged
masih merged 2 commits intomasterfrom
masih/v0-gateway-jsonrpc-spec
Jun 3, 2025
Merged

chore: generate v0 JSON RPC specification#13155
masih merged 2 commits intomasterfrom
masih/v0-gateway-jsonrpc-spec

Conversation

@masih
Copy link
Member

@masih masih commented Jun 3, 2025

Consistently generate v0 JSON RPC specification, similar to what's provided for v1 and v2.

Fixes #13153

Consistently generate v0 JSON RPC specification, similar to what's
provided for v1 and v2.

Fixes #13153
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Jun 3, 2025
@masih masih marked this pull request as ready for review June 3, 2025 12:01
@masih masih requested review from Copilot, rjan90 and rvagg June 3, 2025 12:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for generating the v0 JSON RPC specification alongside existing v1 and v2 outputs.

  • Introduces generateOpenRpcGatewayV0 (and V1) calls in gen/docs/main.go
  • Extends GetAPIType in api/docgen/docgen.go to recognize the v0 Gateway type
  • Records the new chore in CHANGELOG.md

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
gen/docs/main.go Added calls to generateOpenRpcGatewayV0 and generateOpenRpcGatewayV1 and defined those functions
api/docgen/docgen.go Added a case "Gateway" branch for v0api.Gateway in GetAPIType
CHANGELOG.md Logged the chore for generating the v0 JSON RPC specification
Comments suppressed due to low confidence (3)

gen/docs/main.go:21

  • There are no tests covering the new v0 spec generator. Consider adding a unit test to verify the generated file at build/openrpc/v0/gateway.json matches expectations.
lets.Go(generateOpenRpcGatewayV0)

api/docgen/docgen.go:524

  • The new Gateway branch for v0api is untested. A test should ensure GetAPIType("Gateway", ...) returns the correct interface and reflect.Type for v0.
case "Gateway":

CHANGELOG.md:22

  • [nitpick] You may want to update the project README or docs to explain how and where the v0 spec is generated, so consumers know about the new output path.
- chore: generate v0 JSON RPC specification ([filecoin-project/lotus#13155](https://github.com/filecoin-project/lotus/pull/13155))

@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting Review in FilOz Jun 3, 2025
Copy link
Contributor

@rjan90 rjan90 left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from 🔎 Awaiting Review to ✔️ Approved by reviewer in FilOz Jun 3, 2025
@masih masih merged commit 58c1ed8 into master Jun 3, 2025
252 of 256 checks passed
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Jun 3, 2025
@masih masih deleted the masih/v0-gateway-jsonrpc-spec branch June 3, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

Missing JSON-RPC Specification for Gateway v0 API

3 participants