[codex] Add MyPayTag portal SDK contracts - #7
Conversation
|
@codex review |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c227f3d79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| payingDapp: | ||
| $ref: "#/components/schemas/PortalDappSummary" |
There was a problem hiding this comment.
Align the preferences Dapp summary with the protocol schema
When a server follows this OpenAPI component, it may return payingDapp.appUrl because PortalDappSummary explicitly permits that field, but validatePortalPreferencesResponse rejects the same response: the protocol schema's dappSummary has additionalProperties: false and only declares id and displayName. Use a preferences-specific OpenAPI summary or add the field to the protocol schema so generated clients and the runtime validator agree on the public contract.
AGENTS.md reference: AGENTS.md:L3-L7
Useful? React with 👍 / 👎.
| fees: | ||
| type: array | ||
| items: | ||
| type: object |
There was a problem hiding this comment.
Define the nested quote objects in OpenAPI
For every portal history response containing a quote, OpenAPI-generated clients see each fee as an unstructured object; routeSteps and selectedQuote are similarly unconstrained below. The canonical protocol schema instead requires specific fields and rejects additional properties, so a response accepted by this public API contract can fail validatePortalHistoryResponse, while generated SDK types lose all useful quote metadata. Define matching reusable fee, route-step, and selected-quote schemas rather than bare objects.
AGENTS.md reference: AGENTS.md:L3-L7
Useful? React with 👍 / 👎.
| "orderedRouteIds": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { "type": "string", "minLength": 1 } |
There was a problem hiding this comment.
Reject duplicate route IDs in reorder requests
When orderedRouteIds contains the same route more than once, such as ["mpt_route_123", "mpt_route_123"], the new validator accepts it even though the request cannot represent a unique route ordering and may produce duplicate priorities while omitting another route. Add uniqueItems: true here and to the corresponding OpenAPI component so malformed reorder operations are rejected at the contract boundary.
Useful? React with 👍 / 👎.
Summary
Validation
Boundary Notes
Orchestrator Lifecycle