From 7fb3bebba7ce48ec4cf98c120175d993eb619523 Mon Sep 17 00:00:00 2001 From: JeelRajodiya Date: Fri, 6 Sep 2024 15:49:50 +0530 Subject: [PATCH] docs: make first lesson more easy There was no improvement in the churn rate related to #72 --- content/01-Getting-Started/01-Your-First-Schema/code.ts | 4 ++++ .../01-Getting-Started/01-Your-First-Schema/instructions.mdx | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/content/01-Getting-Started/01-Your-First-Schema/code.ts b/content/01-Getting-Started/01-Your-First-Schema/code.ts index b1a7c41..64a66f1 100644 --- a/content/01-Getting-Started/01-Your-First-Schema/code.ts +++ b/content/01-Getting-Started/01-Your-First-Schema/code.ts @@ -1,9 +1,13 @@ + const code: any = { type: "object", properties: { name: { type: "string", }, + age: { + type: "number", + }, }, }; diff --git a/content/01-Getting-Started/01-Your-First-Schema/instructions.mdx b/content/01-Getting-Started/01-Your-First-Schema/instructions.mdx index ee9ca3b..8b6e84e 100644 --- a/content/01-Getting-Started/01-Your-First-Schema/instructions.mdx +++ b/content/01-Getting-Started/01-Your-First-Schema/instructions.mdx @@ -29,8 +29,5 @@ Consider you have a JSON document of an employee: - `name` with value `John Doe` (string) - `age` with value `25` (integer) -**Task:** You are given an incomplete *schema* for above JSON data on the , now: +**Task:** You are given an incorrect *schema* for above JSON data on the . Change the `type` of `age` property to from `number` to `integer` and validate the JSON data. -- Add a new property called `age` under the `properties` section. -- Define the `age` property as follows: - - Set the `type` [keyword](https://json-schema.org/learn/glossary#keyword) for `age` to `integer`. \ No newline at end of file