Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(openapi): Add defaults to rpc methods where needed #8616

Merged
merged 19 commits into from
Jun 20, 2024

Conversation

oxarbitrage
Copy link
Contributor

Motivation

Several of the rpc methods need default implementations so a sample response can be created in the openapi spec.

Solution

Add defaults where needed, complete hardcoded list of rpc methods in the openapi utility. Add a random string as the request ID.

Tests

Manually tested.

PR Author's Checklist

  • The PR name will make sense to users.
  • The PR provides a CHANGELOG summary.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR Author's checklist is complete.
  • The PR resolves the issue.

@oxarbitrage oxarbitrage added A-docs Area: Documentation A-rpc Area: Remote Procedure Call interfaces P-Low ❄️ labels Jun 17, 2024
@oxarbitrage oxarbitrage self-assigned this Jun 17, 2024
@oxarbitrage oxarbitrage requested a review from a team as a code owner June 17, 2024 14:02
@oxarbitrage oxarbitrage requested review from arya2 and removed request for a team June 17, 2024 14:02
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

This looks good, the only part I'm unsure about is the request_id_property type_ field being "number" when the default value is an alphanumeric.

zebra-rpc/src/methods.rs Outdated Show resolved Hide resolved
zebra-rpc/src/methods/trees.rs Outdated Show resolved Hide resolved
zebra-utils/src/bin/openapi-generator/main.rs Show resolved Hide resolved
zebra-utils/src/bin/openapi-generator/main.rs Show resolved Hide resolved
@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Jun 17, 2024
arya2
arya2 previously approved these changes Jun 19, 2024
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

This looks good!

There's a small merge conflict in the changelog, we could put changelog entries in the PR description and move them to the release drafter once the changes are merged instead of updating the changelog file in PRs if we get too many merge conflicts.

@mergify mergify bot merged commit bf6ec76 into main Jun 20, 2024
140 checks passed
@mergify mergify bot deleted the add-defaults-to-rpc-methods branch June 20, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation A-rpc Area: Remote Procedure Call interfaces C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG P-Low ❄️
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants