@podium/schemas
Advanced tools
Comparing version 5.0.0-next.5 to 5.0.0-next.6
@@ -0,1 +1,8 @@ | ||
# [5.0.0-next.6](https://github.com/podium-lib/schemas/compare/v5.0.0-next.5...v5.0.0-next.6) (2022-05-31) | ||
### Features | ||
* Adding support for proxy objects ([#161](https://github.com/podium-lib/schemas/issues/161)) ([6f5de4e](https://github.com/podium-lib/schemas/commit/6f5de4e430c2a2662da079b801e24882d9ba8bc1)) | ||
# [5.0.0-next.5](https://github.com/podium-lib/schemas/compare/v5.0.0-next.4...v5.0.0-next.5) (2022-05-02) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@podium/schemas", | ||
"version": "5.0.0-next.5", | ||
"version": "5.0.0-next.6", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Schemas for validating the @podium contract.", |
@@ -107,12 +107,37 @@ { | ||
}, | ||
"proxy": { | ||
"type": "object", | ||
"type": ["object", "array"], | ||
"default": {}, | ||
"maxProperties": 4, | ||
"patternProperties": { | ||
".*": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
"anyOf": [ | ||
{ | ||
"type": "object", | ||
"maxProperties": 4, | ||
"patternProperties": { | ||
".*": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "array", | ||
"maxItems": 4, | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"target": { | ||
"type": "string", | ||
"format": "uri-reference", | ||
"minLength": 1 | ||
}, | ||
"name": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["target", "name"] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
@@ -119,0 +144,0 @@ "team": { |
@@ -5,3 +5,5 @@ import Ajv from 'ajv'; | ||
const createValidator = (jsonSchema, ajvOptions) => { | ||
const createValidator = (jsonSchema, ajvOptions = { | ||
allowUnionTypes: true, | ||
}) => { | ||
const ajv = new Ajv(ajvOptions); | ||
@@ -29,2 +31,3 @@ formats(ajv); // Needed to support "uri" | ||
removeAdditional: true, | ||
allowUnionTypes: true, | ||
useDefaults: true, | ||
@@ -31,0 +34,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28433
193