chore: generate v0 JSON RPC specification#13155
Merged
Conversation
Consistently generate v0 JSON RPC specification, similar to what's provided for v1 and v2. Fixes #13153
Contributor
There was a problem hiding this comment.
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 ingen/docs/main.go - Extends
GetAPITypeinapi/docgen/docgen.goto recognize the v0Gatewaytype - 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.jsonmatches expectations.
lets.Go(generateOpenRpcGatewayV0)
api/docgen/docgen.go:524
- The new
Gatewaybranch for v0api is untested. A test should ensureGetAPIType("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))
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consistently generate v0 JSON RPC specification, similar to what's provided for v1 and v2.
Fixes #13153