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