vovk 3.0.0-draft.303 → 3.0.0-draft.304

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.
@@ -14,6 +14,10 @@ function jsonSchemaSampler(schema, rootSchema) {
14
14
  if (schema.examples && schema.examples.length > 0) {
15
15
  return schema.examples[0];
16
16
  }
17
+ // Handle const if present
18
+ if (schema.const !== undefined) {
19
+ return schema.const;
20
+ }
17
21
  // Handle $ref if present
18
22
  if (schema.$ref) {
19
23
  return handleRef(schema.$ref, rootSchema);
@@ -14,6 +14,10 @@ function jsonSchemaSampler(schema, rootSchema) {
14
14
  if (schema.examples && schema.examples.length > 0) {
15
15
  return schema.examples[0];
16
16
  }
17
+ // Handle const if present
18
+ if (schema.const !== undefined) {
19
+ return schema.const;
20
+ }
17
21
  // Handle $ref if present
18
22
  if (schema.$ref) {
19
23
  return handleRef(schema.$ref, rootSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.303",
3
+ "version": "3.0.0-draft.304",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",