From fa6594feb3808db4b606c7064ca66858f0f2c62c Mon Sep 17 00:00:00 2001 From: Kentaro Ueda Date: Sat, 24 Apr 2021 01:24:08 +0900 Subject: [PATCH 1/5] Fix typescript sample bug --- docs/api.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api.md b/docs/api.md index c3ef5775e..bbf49215d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -61,15 +61,15 @@ Properties not defined in the schema will not be included in serialized JSON, un If you use JTD with typescript, the type for the schema can be derived from the data type, and generated serializer would only accept correct data type in this case: ```typescript -import Ajv, {JTDSchemaType} from "ajv/dist/jtd" +import Ajv from "ajv/dist/jtd" const ajv = new Ajv() -interface MyData = { +interface MyData { foo: number bar?: string } -const mySchema: JTDSchemaType = { +const mySchema = { properties: { foo: {type: "int32"} // any JTD number type would be accepted here }, From 55706db3fa60660ffb90149d1e13f214c268d968 Mon Sep 17 00:00:00 2001 From: Kentaro Ueda Date: Sun, 25 Apr 2021 14:55:37 +0900 Subject: [PATCH 2/5] Revert chaning type of MyData --- docs/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index bbf49215d..795137afb 100644 --- a/docs/api.md +++ b/docs/api.md @@ -61,7 +61,7 @@ Properties not defined in the schema will not be included in serialized JSON, un If you use JTD with typescript, the type for the schema can be derived from the data type, and generated serializer would only accept correct data type in this case: ```typescript -import Ajv from "ajv/dist/jtd" +import Ajv, {JTDSchemaType} from "ajv/dist/jtd" const ajv = new Ajv() interface MyData { @@ -69,7 +69,7 @@ interface MyData { bar?: string } -const mySchema = { +const mySchema: JTDSchemaType = { properties: { foo: {type: "int32"} // any JTD number type would be accepted here }, From 7e52716c05f02d9f5c4fb5e350a12ef8817453e4 Mon Sep 17 00:00:00 2001 From: Hans Klunder Date: Sun, 25 Apr 2021 19:11:48 +0200 Subject: [PATCH 3/5] Updated Readme --- docs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index c74653d81..f8c6c387f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -211,7 +211,7 @@ Ajv is free to use and open-source that many developers contributed to. Join us! -[Learn Ajv](./docs/getting-started.md) +[Learn Ajv](./guide/getting-started.md) [Reference](./api.md) @@ -225,7 +225,7 @@ Ajv is free to use and open-source that many developers contributed to. Join us! [JSON Type Definition](./json-type-definition.md) -[Contributing](./contributing.html) +[Contributing](./contributing) From b20318116903266d8651d2660c8652b5237a414c Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 26 Apr 2021 18:21:34 +0100 Subject: [PATCH 4/5] update webinar --- README.md | 1 + docs/news/2021-04-24-ajv-webinar-changes-and-version-8.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 3c3eaba97..9b4a84ba7 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Speakers: - [Mehan Jayasuriya](https://github.com/mehan), Program Officer at Mozilla Foundation, leading the [MOSS](https://www.mozilla.org/en-US/moss/) and other programs investing in the open source and community ecosystems. - [Matteo Collina](https://github.com/mcollina), Technical Director at NearForm and Node.js Technical Steering Committee member, creator of Fastify web framework. - [Kin Lane](https://github.com/kinlane), Chief Evangelist at Postman. Studying the tech, business & politics of APIs since 2010. Presidential Innovation Fellow during the Obama administration. +- [Ulysse Carion](https://github.com/ucarion), the creator of JSON Type Definition specification. [Gajus Kuizinas](https://github.com/gajus) will host the event. diff --git a/docs/news/2021-04-24-ajv-webinar-changes-and-version-8.md b/docs/news/2021-04-24-ajv-webinar-changes-and-version-8.md index 9b01e65cc..db8fd4c0a 100644 --- a/docs/news/2021-04-24-ajv-webinar-changes-and-version-8.md +++ b/docs/news/2021-04-24-ajv-webinar-changes-and-version-8.md @@ -11,6 +11,7 @@ Speakers: - [Mehan Jayasuriya](https://github.com/mehan), Program Officer at Mozilla Foundation, leading the [MOSS](https://www.mozilla.org/en-US/moss/) and other programs investing in the open source and community ecosystems. - [Matteo Collina](https://github.com/mcollina), Technical Director at NearForm and Node.js Technical Steering Committee member, creator of Fastify web framework. - [Kin Lane](https://github.com/kinlane), Chief Evangelist at Postman. Studying the tech, business & politics of APIs since 2010. Presidential Innovation Fellow during the Obama administration. +- [Ulysse Carion](https://github.com/ucarion), the creator of JSON Type Definition specification. [Gajus Kuizinas](https://github.com/gajus) will host the event. From ff67954951c66c0ab25019e0966edf4936be09d3 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 26 Apr 2021 18:25:53 +0100 Subject: [PATCH 5/5] fix link --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index f8c6c387f..a461f2765 100644 --- a/docs/README.md +++ b/docs/README.md @@ -225,7 +225,7 @@ Ajv is free to use and open-source that many developers contributed to. Join us! [JSON Type Definition](./json-type-definition.md) -[Contributing](./contributing) +[Contributing](./contributing.md)