From 0d845023a05055841ab92c3991ed237b3023ecf4 Mon Sep 17 00:00:00 2001 From: ALPAC-4 <81249838+ALPAC-4@users.noreply.github.com> Date: Wed, 17 Apr 2024 21:06:07 +0900 Subject: [PATCH] fix: set additionalProperties for metadata to remove strict option in zod (#42) --- _packages/types/package.json | 2 +- _packages/types/src/types/Chain.ts | 1 + _packages/types/src/zods/Chain.ts | 2 +- chain.schema.json | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/_packages/types/package.json b/_packages/types/package.json index da657a5..b95e207 100644 --- a/_packages/types/package.json +++ b/_packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@initia/initia-registry-types", - "version": "0.0.16", + "version": "0.0.17", "description": "The package provides TypeScript type definitions and Zod integration for initia-registry.", "types": "./dist/types/index.d.ts", "exports": { diff --git a/_packages/types/src/types/Chain.ts b/_packages/types/src/types/Chain.ts index e2c89d5..71df382 100644 --- a/_packages/types/src/types/Chain.ts +++ b/_packages/types/src/types/Chain.ts @@ -243,6 +243,7 @@ export interface Chain { version: string; [k: string]: unknown; }; + [k: string]: unknown; }; } export interface FeeToken { diff --git a/_packages/types/src/zods/Chain.ts b/_packages/types/src/zods/Chain.ts index b4ee1fb..b90a498 100644 --- a/_packages/types/src/zods/Chain.ts +++ b/_packages/types/src/zods/Chain.ts @@ -495,7 +495,7 @@ export const ChainSchema = z .describe("[Optional] The type of minitia and the version of it ") .optional(), }) - .strict() + .catchall(z.any()) .optional(), }) .strict() diff --git a/chain.schema.json b/chain.schema.json index 2b80cd4..9ea6bce 100644 --- a/chain.schema.json +++ b/chain.schema.json @@ -624,7 +624,7 @@ "description": "[Optional] The type of minitia and the version of it " } }, - "additionalProperties": false + "additionalProperties": true } }, "additionalProperties": false,