Skip to content

Commit 205c15c

Browse files
committed
docs: update for v4 release
1 parent 7661bfc commit 205c15c

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: build
22

33
on:
44
push:
5-
branches: [master, beta]
5+
branches: [master]
66
pull_request:
77
branches: ["*"]
88

README.md

+7-12
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ Custom JSON-Schema keywords for [Ajv](https://github.com/epoberezkin/ajv) valida
44

55
[![build](https://github.com/ajv-validator/ajv-keywords/workflows/build/badge.svg)](https://github.com/ajv-validator/ajv-keywords/actions?query=workflow%3Abuild)
66
[![npm](https://img.shields.io/npm/v/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords)
7-
[![npm (beta)](https://img.shields.io/npm/v/ajv-keywords/beta)](https://www.npmjs.com/package/ajv-keywords/v/4.0.0-rc.0)
87
[![npm downloads](https://img.shields.io/npm/dm/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords)
9-
[![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv-keywords/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv-keywords?branch=master)
10-
[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
8+
[![coverage](https://coveralls.io/repos/github/ajv-validator/ajv-keywords/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv-keywords?branch=master)
9+
[![gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
1110

12-
**Please note**: This readme file is for [ajv-keywords v4.0.0-beta](https://github.com/ajv-validator/ajv-keywords/releases/tag/v4.0.0-beta.0) that should be used with [ajv v7 (beta)](https://github.com/ajv-validator/ajv).
11+
**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).
1312

1413
[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).
1514

@@ -48,14 +47,10 @@ Custom JSON-Schema keywords for [Ajv](https://github.com/epoberezkin/ajv) valida
4847

4948
## Install
5049

51-
```
52-
npm install ajv-keywords
53-
```
54-
55-
To install version 4 beta to use with [Ajv v7 beta](https://github.com/ajv-validator/ajv/tree/v7-beta):
50+
To install version 4 to use with [Ajv v7](https://github.com/ajv-validator/ajv):
5651

5752
```
58-
npm install ajv-keywords@beta
53+
npm install ajv-keywords
5954
```
6055

6156
## Usage
@@ -517,7 +512,7 @@ These keywords allow to choose the schema to validate the data based on the valu
517512

518513
These keywords must be present in the same schema object (`selectDefault` is optional).
519514

520-
The value of `select` keyword should be a [\$data reference](https://github.com/ajv-validator/ajv/blob/v7-beta/docs/validation.md#data-reference) that points to any primitive JSON type (string, number, boolean or null) in the data that is validated. You can also use a constant of primitive type as the value of this keyword (e.g., for debugging purposes).
515+
The value of `select` keyword should be a [\$data reference](https://github.com/ajv-validator/ajv/blob/master/docs/validation.md#data-reference) that points to any primitive JSON type (string, number, boolean or null) in the data that is validated. You can also use a constant of primitive type as the value of this keyword (e.g., for debugging purposes).
521516

522517
The value of `selectCases` keyword must be an object where each property name is a possible string representation of the value of `select` keyword and each property value is a corresponding schema (from draft-06 it can be boolean) that must be used to validate the data.
523518

@@ -533,7 +528,7 @@ If `select` value (in data) is not a primitive type the validation fails.
533528

534529
This keyword correctly tracks evaluated properties and items to work with `unevaluatedProperties` and `unevaluatedItems` keywords - only properties and items from the subschema that was used (one of `selectCases` subschemas or `selectDefault` subschema) are marked as evaluated.
535530

536-
**Please note**: these keywords require Ajv `$data` option to support [\$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference).
531+
**Please note**: these keywords require Ajv `$data` option to support [\$data reference](https://github.com/ajv-validator/ajv/blob/master/docs/validation.md#data-reference).
537532

538533
```javascript
539534
require('ajv-keywords')(ajv, 'select');

0 commit comments

Comments
 (0)