Skip to content

feat(doc): add dispute management endpoints#12650

Open
AkshayaFoiger wants to merge 11 commits into
mainfrom
dispute-doc
Open

feat(doc): add dispute management endpoints#12650
AkshayaFoiger wants to merge 11 commits into
mainfrom
dispute-doc

Conversation

@AkshayaFoiger

@AkshayaFoiger AkshayaFoiger commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Type of Change

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

Description

Add dispute API reference to open api spec

Screenshot 2026-06-09 at 6 47 52 PM

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

@AkshayaFoiger AkshayaFoiger requested review from a team as code owners June 9, 2026 05:16
@semanticdiff-com

semanticdiff-com Bot commented Jun 9, 2026

Copy link
Copy Markdown

@hyperswitch-bot hyperswitch-bot Bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jun 9, 2026
@mintlify

mintlify Bot commented Jun 9, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
juspay-hyperswitch 🟢 Ready View Preview Jun 9, 2026, 5:32 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@XyneSpaces XyneSpaces left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Classification: Documentation — Dispute Management Endpoints
Risk Level: Low (documentation/OpenAPI spec updates)
Files Changed: 7 files (OpenAPI spec, API models, route definitions, tooling config)


Findings

⚠️ Typo in OpenAPI spec descriptions

The SubmitEvidenceRequest schema has multiple instances of "Fild Id" instead of "File Id":

  • customer_signature: "Fild Id of customer signature"
  • service_documentation: "File Id service documentation" (missing "of")
  • shipping_documentation: "File Id shipping documentation" (missing "of")

Fix: Correct all typos for professional API documentation.


💡 Inconsistent PR description

The PR body has all checkboxes unchecked including "Documentation" and "This PR modifies the API contract". However, the changes:

  1. Add new API endpoints (contract change)
  2. Update documentation

Fix: Update PR description to reflect actual changes — check the "Documentation" and "API contract" boxes.


🔍 Opencode config files in PR

The .opencode/ directory contains IDE/editor-specific configuration (package-lock.json, package.json, project.yaml). These are typically user-specific and should not be committed unless they're standardized team tooling.

Question: Are these Opencode config files intentionally included for team-wide use, or should they be in .gitignore?


Positive Notes

  • Clean addition of utoipa path annotations for new dispute endpoints
  • Proper ToSchema derives added to support OpenAPI generation
  • Consistent endpoint patterns following existing /disputes/* structure
  • Profile-scoped endpoints (/disputes/profile/*) follow established multi-tenancy patterns

Verdict: ⚠️ Comment — Address typos in API documentation before merge. Consider whether Opencode config files should be included.

@XyneSpaces XyneSpaces left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Classification: Documentation — OpenAPI Schema Updates for Dispute Endpoints
Risk Level: Low (documentation-only, adds utoipa derives and route registrations)
Files Changed: 5 files (3 material Rust changes + 1 generated OpenAPI spec + 1 unrelated package-lock.json)


Findings Overview

Severity Count Issue
⚠️ 1 Unrelated package-lock.json included in PR
💡 1 Schema registration ordering inconsistency

Tier 1 — High Signal Issues

⚠️ Unrelated file .opencode/package-lock.json should not be committed

The added .opencode/package-lock.json (376 lines) appears to be an accidental inclusion — it contains @opencode-ai/plugin dependencies unrelated to dispute documentation.

Fix: Remove this file from the PR:

git rm .opencode/package-lock.json
git commit --amend

Tier 2 — Medium Signal

💡 Schema registration order could group dispute types together

In openapi.rs, the newly registered schemas are interspersed among unrelated admin types:

  • MerchantConnectorInfo is grouped with organization types
  • Dispute-specific types (DisputeListFilters, SubmitEvidenceRequest, etc.) are scattered

Fix (optional): Group all dispute-related schemas together for maintainability:

// Dispute schemas
api_models::disputes::DisputeResponse,
api_models::disputes::DisputeResponsePaymentsRetrieve,
api_models::disputes::DisputeListFilters,
api_models::disputes::SubmitEvidenceRequest,
// ... etc

Verification Checklist

ToSchema derives added correctlyEvidenceType and DisputesAggregateResponse now derive ToSchema

Import cleanup is correctfiles::FileMetadataResponse is the precise import needed

Route registrations are complete — All 11 new dispute endpoints registered in the paths() macro

Required schemas registeredCreateFileResponse, FileMetadataResponse, and all dispute types added to components(schemas)


Pre-existing Issues (not introduced by this PR)

None identified.


Verdict: Address the unrelated package-lock.json file before merge. The OpenAPI documentation additions are clean and complete.

@AkshayaFoiger AkshayaFoiger self-assigned this Jun 9, 2026
Anurag-05-prog
Anurag-05-prog previously approved these changes Jun 9, 2026
@AkshayaFoiger AkshayaFoiger removed the request for review from a team June 9, 2026 13:30
@AkshayaFoiger AkshayaFoiger enabled auto-merge June 9, 2026 13:30
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jun 10, 2026
@AkshayaFoiger AkshayaFoiger added the S-test-ready Status: This PR is ready for cypress-tests label Jun 10, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jun 10, 2026
@AkshayaFoiger AkshayaFoiger added this pull request to the merge queue Jun 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 11, 2026
@AkshayaFoiger AkshayaFoiger added this pull request to the merge queue Jun 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-api-contract-changes Metadata: This PR involves API contract changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants