vovk-ajv 0.0.0-draft.75 → 0.0.0-draft.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -26,7 +26,7 @@ const createAjv = (options, target) => {
26
26
  };
27
27
  const validate = ({ data, schema, localize = 'en', type, endpoint, options, target, }) => {
28
28
  if (data && schema) {
29
- const schemaTarget = schema.$schema === 'https://json-schema.org/draft-07/schema#' ? 'draft-07' : 'draft-2020-12';
29
+ const schemaTarget = schema.$schema.includes('://json-schema.org/draft-07/schema') ? 'draft-07' : 'draft-2020-12';
30
30
  const ajv = createAjv(options ?? {}, target ?? schemaTarget);
31
31
  if (data instanceof FormData) {
32
32
  data = Object.fromEntries(data.entries());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-ajv",
3
- "version": "0.0.0-draft.75",
3
+ "version": "0.0.0-draft.78",
4
4
  "description": "Local validation for JSON schemas for vovk-zod and other validation libraries for Vovk.ts",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -33,6 +33,6 @@
33
33
  "ajv-i18n": "^4.2.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "vovk": "^3.0.0-draft.303"
36
+ "vovk": "^3.0.0-draft.318"
37
37
  }
38
38
  }