From f4958ad2d9498fe634bf5b4671a32b5d2951f04f Mon Sep 17 00:00:00 2001 From: "Aaron K. Clark" Date: Tue, 19 May 2026 11:22:39 -0500 Subject: [PATCH] docs(openapi): pin Job schema jobDesc length to match the validator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extends the field-length pinning sweep (Customer/Company/Worker/ BillingType/InventoryItem) to the Job component. \`jobDesc\` is validated by zod as \`z.string().min(1).max(10000)\`; pinning the same bounds in the OpenAPI spec lets SDK generators carry the constraint into client types. Invoice's component is exclusively boolean/integer/date fields with no free-text columns, so no constraint additions are needed there. No behavior change — pure spec metadata. 761 tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/config/openapi.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/config/openapi.js b/app/config/openapi.js index 30bbd43..a6829ab 100644 --- a/app/config/openapi.js +++ b/app/config/openapi.js @@ -132,7 +132,11 @@ const jobSchema = { properties: { jobId: { type: 'integer', readOnly: true }, jobCustId: { type: 'integer' }, - jobDesc: { type: 'string' }, + // jobDesc mirrors job.schema.js: z.string().min(1).max(10000). + // 10000 chars is the same generous limit used for other + // free-text fields (teDescription, polItemDesc) — big enough + // for a paragraph or two without enabling unbounded payloads. + jobDesc: { type: 'string', minLength: 1, maxLength: 10000 }, jobInvoiced: { type: 'boolean' }, jobArch: { type: 'boolean', readOnly: true }, },