Skip to content

Commit 0ddcccd

Browse files
authored
Merge pull request #182 from json-schema-org/benjagm-issue-169
Solves the issue 169 - Avoid the numbered to have all "1." in the getting started guide
2 parents fd5961b + 8001fe3 commit 0ddcccd

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

pages/learn/getting-started-step-by-step.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Using the product catalog example, `productId` is a numeric value that uniquely
9999
To add the `properties` object to the schema:
100100

101101
1. Add the `properties` validation keyword to the end of the schema:
102-
102+
103103
```json
104104
...
105105
"title": "Product",
@@ -114,7 +114,7 @@ To add the `properties` object to the schema:
114114
2. Add the `productId` keyword, along with the following schema annotations:
115115
* `description`: describes what `productId` is. In this case, it’s the product’s unique identifier.
116116
* `type`: defines what kind of data is expected. For this example, since the product identifier is a numeric value, use `integer`.
117-
117+
118118
```json
119119
...
120120
"properties": {
@@ -174,7 +174,7 @@ This section describes how to specify that certain properties are required. This
174174
To define a required property:
175175

176176
1. Inside the `properties` object, add the `price` key. Include the usual schema annotations `description` and `type`, where `type` is a number:
177-
177+
178178
```json
179179
"properties": {
180180
...
@@ -185,7 +185,7 @@ To define a required property:
185185
```
186186

187187
2. Add the `exclusiveMinimum` validation keyword and set the value to zero:
188-
188+
189189
```json
190190
"price": {
191191
"description": "The price of the product",
@@ -195,7 +195,7 @@ To define a required property:
195195
```
196196

197197
3. Add the `required` validation keyword to the end of the schema, after the `properties` object. Add `productID`, `productName`, and the new `price` key to the array:
198-
198+
199199
```json
200200
"price": {
201201
"description": "The price of the product",
@@ -248,7 +248,7 @@ This section describes how to define an optional property. For this example, def
248248
To define an optional property:
249249

250250
1. Inside the `properties` object, add the `tags` keyword. Include the usual schema annotations `description` and `type`, and define `type` as an array:
251-
251+
252252
```json
253253
"properties": {
254254
...
@@ -260,7 +260,7 @@ To define an optional property:
260260
```
261261

262262
2. Add a new validation keyword for `items` to define what appears in the array. For example, `string`:
263-
263+
264264
```json
265265
"tags": {
266266
"description": "Tags for the product",
@@ -272,7 +272,7 @@ To define an optional property:
272272
```
273273

274274
3. To make sure there is at least one item in the array, use the `minItems` validation keyword:
275-
275+
276276
```json
277277
"tags": {
278278
"description": "Tags for the product",
@@ -285,7 +285,7 @@ To define an optional property:
285285
```
286286

287287
4. To make sure that every item in the array is unique, use the `uniqueItems` validation keyword and set it to `true`:
288-
288+
289289
```json
290290
"tags": {
291291
"description": "Tags for the product",
@@ -346,7 +346,7 @@ The earlier examples describe a flat schema with only one level. This section de
346346
To create a nested data structure:
347347

348348
1. Inside the `properties` object, create a new key called `dimensions`:
349-
349+
350350
```json
351351
"properties": {
352352
...
@@ -356,15 +356,15 @@ To create a nested data structure:
356356
```
357357

358358
2. Define the `type` validation keyword as `object`:
359-
359+
360360
```json
361361
"dimensions": {
362362
"type": "object",
363363
}
364364
```
365365

366366
3. Add the `properties` validation keyword to contain the nested data structure. Inside the new `properties` keyword, add keywords for `length`, `width`, and `height` that all use the `number` type:
367-
367+
368368
```json
369369
"dimensions": {
370370
"type": "object",
@@ -383,7 +383,7 @@ To create a nested data structure:
383383
```
384384

385385
4. To make each of these properties required, add a `required` validation keyword inside the `dimensions` object:
386-
386+
387387
```json
388388
"dimensions": {
389389
"type": "object",
@@ -490,7 +490,7 @@ The following schema validates a geographical location:
490490
To reference this schema in the product catalog schema:
491491

492492
1. Inside the `properties` object, add a key named `warehouseLocation`:
493-
493+
494494
```json
495495
"properties": {
496496
...
@@ -500,7 +500,7 @@ To reference this schema in the product catalog schema:
500500
```
501501

502502
2. To link to the external geographical location schema, add the `$ref` schema keyword and the schema URL:
503-
503+
504504
```json
505505
"warehouseLocation": {
506506
"description": "Coordinates of the warehouse where the product is located.",

0 commit comments

Comments
 (0)