Skip to content

chore: update openapi specs #6201

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

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

Jiloc
Copy link
Contributor

@Jiloc Jiloc commented Jun 13, 2025

Description

This PR significantly updates and expands the openapi.yaml specification for the Stacks node RPC API. It adds definitions for numerous previously undocumented V2 and V3 endpoints, refactors common parameters into reusable components for consistency, and enhances existing endpoint definitions with more accurate details, schemas, and examples.

Key changes include:

  • All known RPC endpoints, including those from issue [Docs] Complete documentation of the node RPC-API #4551, are now documented.
  • Fixed numerous outdated endpoints with incorrect/missing/nonexistent parameters and return types.
  • The openapi.yaml has been broken down into reusable components for schemas, parameters, and examples, located in the new docs/rpc/components/ directory. All JSON schemas were converted to YAML.
  • Validation: A redocly.yaml configuration has been added, and the entire specification now passes the redocly lint check.
  • Correction: A minor typo in the metrics identifier for the liststackerdbreplicas endpoint has been fixed (stackedb -> stackerdb).
  • Moved OpenAPI validation and docs creation CI step from stacks-core-tests.yml to ci.yml. While I was testing the new workflow, I realized that the validation would only start after the [CI / Create Test Cache / Test Archive] step, that takes more than 10 minutes and that we can move it at an earlier step.

Applicable issues

Additional info (benefits, drawbacks, caveats)

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated
  • Required documentation changes (e.g., docs/rpc/openapi.yaml and rpc-endpoints.md for v2 endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo
  • New integration test(s) added to bitcoin-tests.yml

@Jiloc Jiloc requested review from a team as code owners June 13, 2025 15:44
@Jiloc Jiloc self-assigned this Jun 13, 2025
@Jiloc Jiloc moved this to Status: In Review in Stacks Core Eng Jun 13, 2025
@Jiloc Jiloc added this to the 3.1.0.0.13 milestone Jun 13, 2025
@Jiloc Jiloc added the documentation Requires new or updates to our documentation label Jun 13, 2025
@wileyj
Copy link
Collaborator

wileyj commented Jun 13, 2025

would it be possible to also address this issue in this PR?
#5214

@wileyj wileyj requested a review from cylewitruk June 13, 2025 17:12
@wileyj
Copy link
Collaborator

wileyj commented Jun 13, 2025

tagging @cylewitruk since #4551 was his idea

@Jiloc
Copy link
Contributor Author

Jiloc commented Jun 16, 2025

would it be possible to also address this issue in this PR? #5214

I'll open a separate PR for that!

@aldur aldur requested a review from wileyj June 17, 2025 15:17
wileyj
wileyj previously approved these changes Jun 18, 2025
Copy link
Collaborator

@wileyj wileyj left a comment

Choose a reason for hiding this comment

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

lgtm

@kantai kantai moved this from Status: In Review to Status: 💻 In Progress in Stacks Core Eng Jun 24, 2025
@wileyj wileyj self-requested a review June 24, 2025 14:54
@wileyj wileyj requested a review from a team June 25, 2025 14:39
@wileyj wileyj moved this from Status: 💻 In Progress to Status: In Review in Stacks Core Eng Jun 25, 2025
@wileyj
Copy link
Collaborator

wileyj commented Jun 26, 2025

pending resolution of the the openapi validation, this seems fine

@obycode obycode modified the milestones: 3.1.0.0.13, 3.1.0.0.14 Jul 1, 2025
@kantai kantai moved this from Status: In Review to Status: 💻 In Progress in Stacks Core Eng Jul 2, 2025
@kantai kantai moved this from Status: 💻 In Progress to Status: In Review in Stacks Core Eng Jul 2, 2025
@Jiloc Jiloc requested a review from a team as a code owner July 8, 2025 10:17
@Jiloc Jiloc requested a review from a team as a code owner July 8, 2025 16:30
@Jiloc
Copy link
Contributor Author

Jiloc commented Jul 9, 2025

@wileyj note that in the latests changes I also moved the validation workflow to ci.yml from stacks-core-tests.yml. The step was gated by the [CI / Create Test Cache / Test Archive (pull_request)] step that isn't actually correlated

@wileyj
Copy link
Collaborator

wileyj commented Jul 9, 2025

@wileyj note that in the latests changes I also moved the validation workflow to ci.yml from stacks-core-tests.yml. The step was gated by the [CI / Create Test Cache / Test Archive (pull_request)] step that isn't actually correlated

hmm, i see the reasoning but i think it's better to keep under stacks-core-tests. otherwise, without some extra conditionals checking that the stacks-core-tests job was successful, this step will run every time - even if tests or other steps/jobs are failing.

it's not a bad thing necesarily (just adds noise), i just think it's better suited as part of the stacks-core-tests workflow. i'm less concerned that the create-test-cache workflow is gating this - if that fails, openapi validation shouldn't even run.

Otherwise, i think the changes still look good - just have to reach consensus on where to run it (along with the composite workflow merge)

@Jiloc
Copy link
Contributor Author

Jiloc commented Jul 11, 2025

@wileyj note that in the latests changes I also moved the validation workflow to ci.yml from stacks-core-tests.yml. The step was gated by the [CI / Create Test Cache / Test Archive (pull_request)] step that isn't actually correlated

hmm, i see the reasoning but i think it's better to keep under stacks-core-tests. otherwise, without some extra conditionals checking that the stacks-core-tests job was successful, this step will run every time - even if tests or other steps/jobs are failing.

it's not a bad thing necesarily (just adds noise), i just think it's better suited as part of the stacks-core-tests workflow. i'm less concerned that the create-test-cache workflow is gating this - if that fails, openapi validation shouldn't even run.

Otherwise, i think the changes still look good - just have to reach consensus on where to run it (along with the composite workflow merge)

I moved it back in e858b09

Copy link

codecov bot commented Jul 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.05%. Comparing base (c76743e) to head (e858b09).
Report is 82 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #6201       +/-   ##
============================================
+ Coverage    66.66%   82.05%   +15.38%     
============================================
  Files          543      546        +3     
  Lines       345656   347235     +1579     
  Branches       323      323               
============================================
+ Hits        230418   284910    +54492     
+ Misses      115230    62317    -52913     
  Partials         8        8               
Files with missing lines Coverage Δ
stackslib/src/net/api/liststackerdbreplicas.rs 90.00% <100.00%> (ø)

... and 432 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c76743e...e858b09. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@wileyj wileyj left a comment

Choose a reason for hiding this comment

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

with the composite merged and working, i think this one is also ready to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Requires new or updates to our documentation
Projects
Status: Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants