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

[TRIVIAL] Fixed driver OpenAPI /reveal request definition #3164

Merged
merged 11 commits into from
Dec 16, 2024

Conversation

mstrug
Copy link
Contributor

@mstrug mstrug commented Dec 13, 2024

Description

OpenAPI driver /reveal request has 3 fields: solutionId, submissionDeadlineLatestBlock, auctionId which is inconsistent with the source code, where /reveal request has only 2 fields: solutionId and auctionId: source.

Changes

/settle and /reveal endpoints have same API definition: Solution, so I've created new API component: SolutionWithDeadline and assigned it to /settle endpoint. From Solution I've removed submissionDeadlineLatestBlock field which now aligns with /reveal endpoint source code.
Renamed driver settle dto module solution.rs to solution_with_deadline.rs and name of the struct Solution to SolutionWithDeadline.

Copy link

Reminder: Please consider backward compatibility when modifying the API specification.
If breaking changes are unavoidable, ensure:

  • You explicitly pointed out breaking changes.
  • You communicate the changes to affected teams.
  • You provide proper versioning and migration mechanisms.

Caused by:

@mstrug mstrug marked this pull request as ready for review December 13, 2024 21:13
@mstrug mstrug requested a review from a team as a code owner December 13, 2024 21:13
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

I think in order to avoid renaming everything every time we add or remove a field we should consider renaming files, top level structs and API references to sth like [reveal_]request and [reveal_]response (same for /solve and /settle)

crates/driver/openapi.yml Outdated Show resolved Hide resolved
crates/driver/openapi.yml Outdated Show resolved Hide resolved
@mstrug
Copy link
Contributor Author

mstrug commented Dec 16, 2024

I think in order to avoid renaming everything every time we add or remove a field we should consider renaming files, top level structs and API references to sth like [reveal_]request and [reveal_]response (same for /solve and /settle)

Renamed /reveal, /solve and /settle related files and struct names and updated openapi.yml file.

Copy link
Contributor

@sunce86 sunce86 left a comment

Choose a reason for hiding this comment

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

Tests passing without adjustments in the code show that no breaking changes are introduced.

LGTM

Copy link
Contributor

@squadgazzz squadgazzz left a comment

Choose a reason for hiding this comment

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

LG

@squadgazzz
Copy link
Contributor

Btw, I suppose, this is not a TRIVIAL but EASY change 🙂

@mstrug mstrug merged commit 6fe5635 into main Dec 16, 2024
11 checks passed
@mstrug mstrug deleted the fix/driver-openapi-reveal-request branch December 16, 2024 17:00
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants