-
Notifications
You must be signed in to change notification settings - Fork 83
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
Enums camel case serialization #2056
Conversation
# Conflicts: # crates/driver/src/infra/solver/dto/notification.rs # crates/solvers/src/api/routes/notify/dto/notification.rs
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
BTW if you write fixes: #SOME_ISSUE_NUMBER
in the PR description it will auto-close that issue when the PR gets merged. I believe this will not happen if you only list it in the related issues section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I see a few more occurrences of lowercase
in our codebase. Can we substitute those also (with the exception of the ones related to database)?
@anxolin can someone from the frontend team check if this PR breaks the API? namely changes around |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should only rename the "new" APIs where we currently still control both sides of the communication. We shouldn't make any breaking changes to the public facing orderbook API (it's not worth the effort of rolling this out) and also not to the APIs we are consuming.
Let's not change the crates/model
, crates/orderbook
and any infra where the upstream is not one of our services.
crates/shared/src/tenderly_api.rs
Outdated
@@ -169,7 +169,7 @@ pub struct SimulationRequest { | |||
} | |||
|
|||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] | |||
#[serde(rename_all = "lowercase")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't control the API, so this may break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
@@ -9,7 +9,7 @@ use { | |||
}; | |||
|
|||
#[derive(Debug, Serialize)] | |||
#[serde(rename_all = "lowercase")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this API is also maintained by balancer and thus may break (but given the non compound words, it may not be an issue here)
@@ -88,7 +88,7 @@ async fn sell() { | |||
}]) | |||
.await; | |||
|
|||
let engine = tests::SolverEngine::new("zeroex", zeroex::config(&api.address)).await; | |||
let engine = tests::SolverEngine::new("zeroEx", zeroex::config(&api.address)).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we don't really need to change this, do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
@@ -148,7 +148,7 @@ async fn sell() { | |||
]) | |||
.await; | |||
|
|||
let engine = tests::SolverEngine::new("paraswap", paraswap::config(&api.address)).await; | |||
let engine = tests::SolverEngine::new("paraSwap", paraswap::config(&api.address)).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also no need to change this (I think we at some point decided to have all solver names lower case).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
569b619
to
1a33c98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anxolin can someone from the frontend team check if this PR breaks the API? namely changes around signingScheme
@sunce86 We would need a bit more of context to test this. Is this really a breaking change? (or it doesn't affect to the requests we are doing and is just affecting the swagger types?
Also, i don't see any change in the swagger for the normal API, but i see changes in the one for solvers. Is it possible you forgot to generate the swagger? @mfw78 do we generate it dynamically or is still manual?
It shouldn't be a breaking change (this is what we need to test). |
Here are some instructions on how to point the web to your local API https://github.com/cowprotocol/cowswap#orderbook-api-endpoints |
Still manual as far as I'm aware. |
Tested locally with |
Description
Copied from the original PR:
Related PRs
#2020
fixes: #2016