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: swagger conflict v0.47 #519

Merged
merged 3 commits into from
May 11, 2023
Merged

fix: swagger conflict v0.47 #519

merged 3 commits into from
May 11, 2023

Conversation

Senna46
Copy link
Contributor

@Senna46 Senna46 commented May 10, 2023

Fixed a problem with conflicting Queries in newDevelop; renamed some Queries in Derivatives.

@mkXultra Plz review & marge. No change in logic.

@Senna46 Senna46 requested a review from mkXultra May 10, 2023 07:24
},
}
}
},
{
"url": "./tmp-swagger-gen/nftmint/query.swagger.json",
"operationIds": {

Choose a reason for hiding this comment

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

This code patch appears to be incomplete and difficult to review without additional context. It seems to modify a Swagger/OpenAPI specification file by renaming the "Params" object to "YieldAggregatorParams" in an operation named "rename".

However, based on the provided snippet, I cannot identify any obvious bug risks or improvement suggestions. Further information would be needed to properly evaluate the effectiveness of these changes and ensure they align with the intended functionality of the Swagger file.

@@ -328,7 +328,7 @@ message QueryEstimateRedeemAmountRequest {
];
}

message QueryEstimateRedeemAmountResponse {
message QueryEstimateRedeemTokenAmountResponse {
cosmos.base.v1beta1.Coin amount = 1 [
(gogoproto.moretags) = "yaml:\"amount\"",
(gogoproto.nullable) = false

Choose a reason for hiding this comment

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

This code patch appears to be modifying two rpc methods and their corresponding request/response messages in a protobuf file.

In the Query service, the name of the first rpc method has been changed from "EstimateRedeemAmount" to "EstimateRedeemTokenAmount", and the name of its request message has been changed from "QueryEstimateRedeemAmountRequest" to "QueryEstimateRedeemTokenAmountRequest". Similarly, the name of its response message has been changed from "QueryEstimateRedeemAmountResponse" to "QueryEstimateRedeemTokenAmountResponse".

No other changes seem to have been made to this file. From a brief review, there don't appear to be any obvious bug risks. However, without further context on the use of these messages and methods, it's hard to make specific improvement suggestions.

Overall, the changes appear to be straightforward and should be safe as long as they are properly updated throughout the rest of the project where they are being used.

@@ -335,7 +335,7 @@ The derivatives module primarily provides the following queries:
- [AddressPositions](https://github.com/UnUniFi/chain/blob/caf28770588ef1370f5ca8d58e9b17e2b131064b/proto/derivatives/query.proto#L267-L280)
- [DLPTokenRates](https://github.com/UnUniFi/chain/blob/caf28770588ef1370f5ca8d58e9b17e2b131064b/proto/derivatives/query.proto#L283-L292)
- [EstimateDLPTokenAmount](https://github.com/UnUniFi/chain/blob/caf28770588ef1370f5ca8d58e9b17e2b131064b/proto/derivatives/query.proto#L294-L312)
- [EstimateRedeemAmount](https://github.com/UnUniFi/chain/blob/caf28770588ef1370f5ca8d58e9b17e2b131064b/proto/derivatives/query.proto#L314-L332)
- [EstimateRedeemTokenAmount](https://github.com/UnUniFi/chain/blob/caf28770588ef1370f5ca8d58e9b17e2b131064b/proto/derivatives/query.proto#L314-L332)

# Params

Choose a reason for hiding this comment

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

This appears to be a difference in the name of a function in the derivatives module. The previous name was "EstimateRedeemAmount" and it has been changed to "EstimateRedeemTokenAmount". It's hard to say if this change introduces any bugs without seeing the implementation, but based on the name, it seems like a reasonable change that clarifies the purpose of the function.

As for improvement suggestions, it would be helpful to include more context regarding the code being reviewed. Are there specific goals or metrics that the code should aim to meet? Additionally, documentation is always helpful for future maintainers and contributors to understand the purpose and behavior of the code.

@mkXultra mkXultra merged commit 4cbeeb7 into newDevelop May 11, 2023
@mkXultra mkXultra deleted the fix/swagger-v47 branch May 11, 2023 04:06
taiki1frsh pushed a commit that referenced this pull request May 11, 2023
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.

2 participants