Skip to content

Commit 0350021

Browse files
committed
Update README.md
1 parent ccd23ec commit 0350021

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# JSON Schema TypeScript definitions
22

3-
This library contains TypeScript defitions for JSON Schema. It may be useful when you want to programmable generate JSON Schema.
3+
This package contains TypeScript definitions for JSON Schema. It may be useful in all kind of TypeScript projects that work with JSON Schema directly.
44

5-
Following types are exposed:
5+
Supported JSON Schema drafts:
66

7-
* `StringJsonSchema`
8-
* `IntegerJsonSchema`
9-
* `NumberJsonSchema`
10-
* `BooleanJsonSchema`
11-
* `NullJsonSchema`
12-
* `AnyJsonSchema` — when `type` property is not defined and type-specific properties (e.g. `maxLength` is specific to `string` type) are not defined either.
7+
- [2020-12](https://json-schema.org/draft/2020-12/json-schema-core.html)
8+
9+
## Getting started
10+
11+
Install the definitions:
12+
13+
```bash
14+
npm install @fosfad/json-schema-typescript-definitions
15+
```
16+
17+
Import `JsonSchema` type definition:
18+
19+
```typescript
20+
import { JsonSchema } from '@fosfad/json-schema-typescript-definitions/2020-12';
21+
```

0 commit comments

Comments
 (0)