From dd544f701f2d609076d3b157f745eb48e0163883 Mon Sep 17 00:00:00 2001 From: Jeremy LaCivita Date: Thu, 9 May 2024 12:45:47 -0400 Subject: [PATCH] fix: Merge #186 --- src/validate/index.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/validate/index.mjs b/src/validate/index.mjs index 22e7e468..970b076e 100644 --- a/src/validate/index.mjs +++ b/src/validate/index.mjs @@ -74,10 +74,11 @@ const run = async ({ const jsonSchemaSpec = await (await fetch('https://meta.json-schema.tools')).json() // - OpenRPC uses `additionalItems` when `items` is not an array of schemas. This fails strict validate, so we remove it - // - OpenRPC uses raw.githubusercontent.com URLs for the json-schema spec, we replace this with the up to date spec on meta.json-schema.tools const openRpcSpec = await (await fetch('https://meta.open-rpc.org')).json() removeIgnoredAdditionalItems(openRpcSpec) - replaceUri('https://raw.githubusercontent.com/json-schema-tools/meta-schema/1.5.9/src/schema.json', 'https://meta.json-schema.tools/', openRpcSpec) + + //AJV doesn't like not having a slash at the end of the URL + replaceUri('https://meta.json-schema.tools', 'https://meta.json-schema.tools/', openRpcSpec) Object.values(sharedSchemas).forEach(schema => { try {