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(refunds): remove to schema from refund aggregate response and exclude it from open api documentation #6405

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

qstommyshu
Copy link
Contributor

@qstommyshu qstommyshu commented Oct 22, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables
  1. Removed ToSchema trait for RefundAggregateResponse.
  2. Removed references from openapi and openapi_v2 to RefundAggregateResponse.
  3. Generated new openapi_spec file based on the above changes.

Motivation and Context

#5990

How did you test it?

Tested manually.
The references of RefundAggregateResponse is removed in openapi generated json file after the modification.
image

image

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@qstommyshu qstommyshu requested a review from a team as a code owner October 22, 2024 20:13
Copy link

semanticdiff-com bot commented Oct 22, 2024

Review changes with SemanticDiff.

Analyzed 5 of 5 files.

Overall, the semantic diff is 1% smaller than the GitHub diff.

Filename Status
✔️ crates/openapi/src/openapi.rs 9.83% smaller
✔️ crates/openapi/src/openapi_v2.rs 9.83% smaller
✔️ crates/api_models/src/refunds.rs Analyzed
✔️ api-reference-v2/openapi_spec.json Analyzed
✔️ api-reference/openapi_spec.json Analyzed

@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Oct 22, 2024
@qstommyshu qstommyshu changed the title fix(openapi): remove to schema from refund aggregate response and exclude it from open api documentation fix(refunds): remove to schema from refund aggregate response and exclude it from open api documentation Oct 22, 2024
@qstommyshu
Copy link
Contributor Author

qstommyshu commented Oct 22, 2024

Hi @apoorvdixit88 ,

I've removed all the openapi references (both v1 and v2) to RefundAggregateResponse. However, I don't see any differences in the generated openapi documents. It seems RefundAggregateResponse is not displayed originally even though openapi document has reference to it.

@qstommyshu
Copy link
Contributor Author

Hi @apoorvdixit88 @gorakhnathy7 ,

Would you mind adding hacktoberfest-accepted label to this PR?

@apoorvdixit88 apoorvdixit88 added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor A-refunds Area: Refund flows hacktoberfest Issues that are up for grabs for Hacktoberfest participants C-bug Category: Bug labels Oct 23, 2024
@apoorvdixit88
Copy link
Contributor

Hi @apoorvdixit88 ,

I've removed all the openapi references (both v1 and v2) to RefundAggregateResponse. However, I don't see any differences in the generated openapi documents. It seems RefundAggregateResponse is not displayed originally even though openapi document has reference to it.

Hi @qstommyshu
We can see the openapi documents changes in the files.
Also there is some conflict, can you please check?

@qstommyshu
Copy link
Contributor Author

Hi @apoorvdixit88 ,
I've removed all the openapi references (both v1 and v2) to RefundAggregateResponse. However, I don't see any differences in the generated openapi documents. It seems RefundAggregateResponse is not displayed originally even though openapi document has reference to it.

Hi @qstommyshu We can see the openapi documents changes in the files. Also there is some conflict, can you please check?

I pulled out the generated openapi documents but didn't see anything different for some reason...

@Gnanasundari24
Copy link
Contributor

@qstommyshu Please add the proper description and testcases

@apoorvdixit88
Copy link
Contributor

@qstommyshu Please add the proper description and testcases

HI @qstommyshu Please add description as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-refunds Area: Refund flows C-bug Category: Bug C-refactor Category: Refactor hacktoberfest Issues that are up for grabs for Hacktoberfest participants M-api-contract-changes Metadata: This PR involves API contract changes S-waiting-on-review Status: This PR has been implemented and needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] Remove ToSchema from RefundAggregateResponse and exclude it from OpenAPI documentation
9 participants