docs(UPIIS-47): serve UPI Issuance images from CDN + tighten API field validation#447
Merged
Merged
Conversation
- swap 7 local img srcs to docs-assets CDN - add field constraints/regex to user-otp & device-binding tables Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the create-VPA `vpa-account-mismatch` (409) error and a note that re-linking a VPA to a different account requires an explicit deregister first (Setu never silently re-points an active VPA at a different account). Finish documenting the inline field-validation rules (formats, lengths, patterns, enums) across the onboarding, program and payee-blocklist API references, mirrored in the OpenAPI spec.
The API envelope now carries clientId and sig on every request. Document the signing steps (sig = base64(HMAC-SHA256(clientSecret, plaintext body))), add the fields to the request format and the Python reference implementation, and update the quickstart credentials + authentication sections. A missing or invalid signature is rejected 401 invalid-signature. Closes UPIIS-53
Checklist to merge a PR 🚀To merge this pull request, please take time to complete the checklist. What action did you perform?Review the corresponding checklist items for the action you performed and mark them done. Edit an existing content (MDX) pageChecklist
Edit an existing API reference pageChecklist
Add a new content (MDX) pageChecklist
Add a new API reference pageChecklist
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes broken images in the UPI Issuance docs and tightens field-validation
detail in the API tables.
Images
The UPI Issuance pages referenced diagrams by local path
(
<img src="/upi-issuance/onboarding-flow.png">). Those paths only resolve inthe
docs-mdxpreview app — on the published docs site they render as brokenimages.
Uploaded the five diagrams to the assets bucket following the folder structure
in the README, and repointed all 7 refs at the CDN:
onboarding-flow.pnghttps://docs-assets.setu.co/latest/payments/upi-issuance/onboarding-flow.pngdevice-change-flow.png.../payments/upi-issuance/device-change-flow.pngvpa-activation.png.../payments/upi-issuance/vpa-activation.pnguser-activation.png.../payments/upi-issuance/user-activation.pngdevice-binding.png.../payments/upi-issuance/device-binding.pngAll five verified live — HTTP
200,Content-Type: image/png, byte sizesmatch the source files.
Validation docs
user-otp.mdxanddevice-binding.mdxtables now carry explicit fieldconstraints instead of prose —
mobileas 12 digits (^[0-9]{12}$),otpas6 digits (
^[0-9]{6}$),vpaasprefix@handle(max 255),deviceIdandidempotencyKeylength caps — and theinvalid-requestrows say what actuallyfails validation.
Testing
curlagainst each CDN URL →200 image/png, sizes match sourcesrc="/upi-issuance/..."refs remain incontent/Notes for reviewers
docs-mdx-assets, but the README documents the bucket asstrapi-assets. The CDN serves fromdocs-mdx-assets, so the README namelooks stale — worth a follow-up fix so the next person isn't sent to the
wrong bucket.
(
latest/<Asset_Name>/<Asset_Name>.png). This PR follows the documentedconvention instead (mirroring the
/contentfolder structure), which is whatthe README prescribes.