Skip to content

Align openapi with code structs#104

Merged
zoedberg merged 1 commit into
RGB-Tools:masterfrom
Arshia-r-m:improve-openapi
Mar 12, 2026
Merged

Align openapi with code structs#104
zoedberg merged 1 commit into
RGB-Tools:masterfrom
Arshia-r-m:improve-openapi

Conversation

@Arshia-r-m
Copy link
Copy Markdown
Contributor

This Pr propose changes to openapi.yaml to match them more closely to what end-points expect.

Issue defined here #103

Copilot AI review requested due to automatic review settings March 6, 2026 15:09
Copy link
Copy Markdown

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

Updates openapi.yaml to better reflect the Rust API request/response structs (per Issue #103), improving OpenAPI code generation compatibility and schema accuracy.

Changes:

  • Added required lists across many schemas to match non-optional Rust fields.
  • Tightened numeric schemas (e.g., fee_rate, amount) by switching some number fields to integer and adding formats/min/max constraints.
  • Aligned certain schema shapes/names with the code (e.g., proxy_endpoint, using Assignment in more places).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Copy link
Copy Markdown

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread openapi.yaml
@Arshia-r-m
Copy link
Copy Markdown
Contributor Author

The problem on tests is from the race condition I mentioned on #105 , I think we can merge this one untill I work on that issue

Copy link
Copy Markdown
Member

@zoedberg zoedberg left a comment

Choose a reason for hiding this comment

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

Thanks. Please address the requested changes

Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml
Comment thread openapi.yaml Outdated
@Arshia-r-m
Copy link
Copy Markdown
Contributor Author

I fixed and rebased on master, let me know if any thing else requires changes

Comment thread openapi.yaml
Copy link
Copy Markdown
Member

@zoedberg zoedberg left a comment

Choose a reason for hiding this comment

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

we are almost there, but it seems you forgot to define required in ListAssetsResponse

Comment thread openapi.yaml Outdated
Comment thread openapi.yaml
properties:
file:
type: string
format: binary
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just to make sure, since you asked me to remove the format fields, do you want to keep this one or we can also drop this?
From my understanding, we have to keep this one since string doesn't explain it properly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I recall correctly without this the swagger interface does not render correctly, but I would appreciate if you could check this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I checked, having it is better.

@Arshia-r-m
Copy link
Copy Markdown
Contributor Author

Sorry this is taking so long, I did a careful review on the changes, let me know what you do you think on my last comment and then we can proceed, thanks

@zoedberg zoedberg changed the title Align openapi with code srtucts Align openapi with code structs Mar 12, 2026
@zoedberg zoedberg merged commit 753b18f into RGB-Tools:master Mar 12, 2026
11 of 12 checks passed
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.

3 participants