Socket
Socket
Sign inDemoInstall

ajv-keywords

Package Overview
Dependencies
6
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0-beta.1 to 5.0.0

2

dist/definitions/select.js

@@ -29,3 +29,3 @@ "use strict";

cxt.setParams({ schemaProp });
gen.elseIf(codegen_1._ `${value} == ${schemaProp}`); // intentional ==, to match numbers and booleans
gen.elseIf(codegen_1._ `"" + ${value} == ${schemaProp}`); // intentional ==, to match numbers and booleans
const schCxt = cxt.subschema({ keyword: "selectCases", schemaProp }, schValid);

@@ -32,0 +32,0 @@ cxt.mergeEvaluated(schCxt, codegen_1.Name);

{
"name": "ajv-keywords",
"version": "5.0.0-beta.1",
"description": "Custom JSON-Schema keywords for Ajv validator",
"version": "5.0.0",
"description": "Additional JSON-Schema keywords for Ajv JSON validator",
"main": "dist/index.js",

@@ -41,3 +41,3 @@ "types": "dist/index.d.ts",

"peerDependencies": {
"ajv": "^8.0.0-beta.4"
"ajv": "^8.0.0"
},

@@ -52,4 +52,4 @@ "devDependencies": {

"@typescript-eslint/parser": "^4.4.1",
"ajv": "^8.0.0-beta.4",
"ajv-formats": "^2.0.0-beta.2",
"ajv": "^8.0.0",
"ajv-formats": "^2.0.0",
"chai": "^4.2.0",

@@ -56,0 +56,0 @@ "eslint": "^7.2.0",

@@ -11,3 +11,3 @@ # ajv-keywords

**Please note**: This readme file is for [ajv-keywords v4.0.0](https://github.com/ajv-validator/ajv-keywords/releases/tag/v4.0.0) that should be used with [ajv v7](https://github.com/ajv-validator/ajv).
**Please note**: This readme file is for [ajv-keywords v5.0.0](https://github.com/ajv-validator/ajv-keywords/releases/tag/v5.0.0) that should be used with [ajv v8](https://github.com/ajv-validator/ajv).

@@ -512,2 +512,4 @@ [ajv-keywords v3](https://github.com/ajv-validator/ajv-keywords/tree/v3) should be used with [ajv v6](https://github.com/ajv-validator/ajv/tree/v6).

**Please note**: these keywords are deprecated. It is recommended to use OpenAPI [discriminator](https://ajv.js.org/json-schema.html#discriminator) keyword supported by Ajv v8 instead of `select`.
These keywords allow to choose the schema to validate the data based on the value of some property in the validated data.

@@ -514,0 +516,0 @@

@@ -36,3 +36,3 @@ import type {KeywordDefinition, KeywordErrorDefinition, KeywordCxt, ErrorObject} from "ajv"

cxt.setParams({schemaProp})
gen.elseIf(_`${value} == ${schemaProp}`) // intentional ==, to match numbers and booleans
gen.elseIf(_`"" + ${value} == ${schemaProp}`) // intentional ==, to match numbers and booleans
const schCxt = cxt.subschema({keyword: "selectCases", schemaProp}, schValid)

@@ -39,0 +39,0 @@ cxt.mergeEvaluated(schCxt, Name)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc