ajv-validator / ajv

The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
https://ajv.js.org
MIT License
13.83k stars 876 forks source link

Extract Schema types to separate Repo #2129

Open heath-freenome opened 2 years ago

heath-freenome commented 2 years ago

What version of Ajv you are you using? AJV-8

What problem do you want to solve? I am a contributor to React JSON Schema Form and we have a situation where we are using either AJV 6 or 8 in different circumstances. We are currently using @types/json-schema for the JSONSchema7 definition. We are wanting to be able to use the schema types from AJV in our Repos without pulling the whole of the AJV implementation

What do you think is the correct solution to problem?

Extract the Typescript definitions for Schemas (for JSONSchema7, 2019, 2020) into a new repo (e.g. ajv-schema-types, ajv-json-schemas or ajv-types) so that it can be imported without the overhead of the implementations

Will you be able to implement it? Possibly

zbayoff commented 1 year ago

Second this issue as it would help us to fully type our json schema while using the React JSON Schema form library with AJV validation.

TheOneTheOnlyJJ commented 2 months ago

Is there any update on this? Having this done would improve the DX of many projects.