Skip to content

docs(openapi): pin CustomerPayment cpayDescription length to match the validator#296

Merged
CryptoJones merged 1 commit into
masterfrom
docs/openapi-customerpayment-field-constraints
May 19, 2026
Merged

docs(openapi): pin CustomerPayment cpayDescription length to match the validator#296
CryptoJones merged 1 commit into
masterfrom
docs/openapi-customerpayment-field-constraints

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Summary

Extends the field-length pinning sweep (Customer #270, Company #272, Worker #276, BillingType+InventoryItem #290, Job #294).

cpayDescription is validated by zod as z.string().max(10000). Pinning the same maxLength in the OpenAPI spec lets SDK generators surface the constraint to client types.

Notes

  • cpayAmount has zod refinements (finite + non-zero) that don't have direct OpenAPI primitives; documented inline so future readers know to consult the validator for the full contract.
  • PurchaseOrderVendor / Header / Line still have unpinned components — separate follow-up PRs to keep this one tight.

Test plan

  • npm run lint && npm test — 761 passing.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

…e validator

Extends the field-length pinning sweep. \`cpayDescription\` is
validated by zod as \`z.string().max(10000)\`; pinning the same
\`maxLength\` in the OpenAPI spec lets SDK generators surface the
constraint.

\`cpayAmount\` has zod refinements (finite + non-zero) that don't
have direct OpenAPI primitives; documented inline so future readers
know to consult the validator for the full contract.

Other schemas with free-text fields (PurchaseOrderVendor,
PurchaseOrderHeader, PurchaseOrderLine) still have unpinned
OpenAPI components — separate follow-up PRs. This batch just
covers CustomerPayment so the change stays one-entity-per-PR.

No behavior change — pure spec metadata. 761 tests still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CryptoJones CryptoJones merged commit f621962 into master May 19, 2026
3 checks passed
@CryptoJones CryptoJones deleted the docs/openapi-customerpayment-field-constraints branch May 19, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant