Need to Rewrite an Old Version of a Validator Function to the Latest Version

Job ID: 37579284

Budget: $25 – $30 USD

We use JSON schema in Amazon SP-API to validate product information before registration. I need this validation function to be fixed as it's not working correctly.

Environment:
TypeScript 5.3.3
Node.js 18.4.0
ECMAScript
(Module) @hyperjump/json-schema ^1.6.7 https://github.com/hyperjump-io/json-schema

The following URL is an example of a validator implementation using JavaScript:
https://developer-docs.amazon.com/sp-api/lang-en_US/docs/product-type-definition-meta-schema-v1-example-javascript

This code has several issues. It uses both @hyperjump/json-schema and @hyperjump/json-schema-core modules, but the latter has been deprecated and merged into @hyperjump/json-schema. I am unsure how to rewrite the sample code to use only @hyperjump/json-schema.

Please rewrite this sample validator function to work in my environment. I will provide my sample code, and I have questions about how to use this function.
Related categories: JavaScript Node.js Typescript ECMAScript