feat(doc): add dispute management endpoints#12650
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
XyneSpaces
left a comment
There was a problem hiding this comment.
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
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:
- Add new API endpoints (contract change)
- 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
ToSchemaderives added to support OpenAPI generation - Consistent endpoint patterns following existing
/disputes/*structure - Profile-scoped endpoints (
/disputes/profile/*) follow established multi-tenancy patterns
Verdict:
XyneSpaces
left a comment
There was a problem hiding this comment.
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
.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 --amendTier 2 — Medium Signal
💡 Schema registration order could group dispute types together
In openapi.rs, the newly registered schemas are interspersed among unrelated admin types:
MerchantConnectorInfois 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,
// ... etcVerification Checklist
✅ ToSchema derives added correctly — EvidenceType and DisputesAggregateResponse now derive ToSchema
✅ Import cleanup is correct — files::FileMetadataResponse is the precise import needed
✅ Route registrations are complete — All 11 new dispute endpoints registered in the paths() macro
✅ Required schemas registered — CreateFileResponse, 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.
97eac8a to
28f0380
Compare
36878ab
Type of Change
Description
Add dispute API reference to open api spec
Checklist
cargo +nightly fmt --allcargo clippy