From b06c00aeb633bb754349fd1f43d8c85330b901e9 Mon Sep 17 00:00:00 2001 From: Sri Charan Ratlan Date: Wed, 11 Nov 2026 16:04:22 +0530 Subject: [PATCH] fix(express): emit format number for BigIntFromString in OpenAPI spec The express OpenAPI codec config overrides the io-ts-types BigIntFromString handler to a plain { type: 'string' }. Because the generator merges custom config per module, this replaced the built-in handler, which emits { type: 'string', format: 'number' }. wallet-platform has no io-ts-types override and uses the built-in handler, so shared @bitgo/public-types components such as LightningOnchainRequest and LightningPaymentRequest were generated differently in express.yaml and wallet-platform.yaml. The api-docs static analysis then flagged them, and the schemas that reference them, as colliding components. Set the override to the built-in output so both specs match. Ticket: WCI-2237 --- modules/express/openapi-generator.rc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/express/openapi-generator.rc.js b/modules/express/openapi-generator.rc.js index 5b1f11f247..9eb2b4ff79 100644 --- a/modules/express/openapi-generator.rc.js +++ b/modules/express/openapi-generator.rc.js @@ -13,7 +13,9 @@ module.exports = (E) => { Json: () => E.right({ type: 'object', properties: {}, required: [] }), NonEmptyString: () => E.right({ type: 'string', minLength: 1 }), DateFromISOString: () => E.right({ type: 'string', format: 'date-time' }), - BigIntFromString: () => E.right({ type: 'string' }), + // Matches the generator's built-in io-ts-types handler (used by wallet-platform) so that + // components shared with wallet-platform.yaml are emitted identically. + BigIntFromString: () => E.right({ type: 'string', format: 'number', decodedType: 'bigint' }), BooleanFromString: () => E.right({ type: 'boolean' }), NumberFromString: () => E.right({ type: 'string' }), },