Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Change http links to https for links to json-schema.org in documentation #355

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion draft-07/json-hyper-schema-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ for information related to draft-05.
### Migrating from draft-04

In the ideal draft-07 world, links and
[operations](http://json-schema.org/draft-07/json-schema-hypermedia.html#rfc.section.3.1)
[operations](https://json-schema.org/draft-07/json-schema-hypermedia.html#rfc.section.3.1)
are not the same concept. Using terminology borrowed from
[OpenAPI's Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#operationObject), HTTP methods are operations, and each
link (as described by a single LDO) can support multiple operations.
Expand Down
38 changes: 19 additions & 19 deletions learn/file-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ We will start with a base JSON Schema expressing the following constraints:

Building out our JSON Schema from top to bottom:

* The [`$id`](http://json-schema.org/latest/json-schema-core.html#rfc.section.8.2) keyword.
* The [`$schema`](http://json-schema.org/latest/json-schema-core.html#rfc.section.7) keyword.
* The [`type`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.1) validation keyword.
* The [`required`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.3) validation keyword.
* The [`properties`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.4) validation keyword.
* The [`$id`](https://json-schema.org/latest/json-schema-core.html#rfc.section.8.2) keyword.
* The [`$schema`](https://json-schema.org/latest/json-schema-core.html#rfc.section.7) keyword.
* The [`type`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.1) validation keyword.
* The [`required`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.3) validation keyword.
* The [`properties`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.4) validation keyword.
* The `/` key is empty now; We will fill it out later.
* The [`patternProperties`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.5) validation keyword.
* The [`patternProperties`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.5) validation keyword.
* This matches other property names via a regular expression. Note: it does not match `/`.
* The `^(/[^/]+)+$` key is empty now; We will fill it out later.
* The [`additionalProperties`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.6) validation keyword.
* The [`additionalProperties`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.6) validation keyword.
* The value here is `false` to constrain object properties to be either `/` or to match the regular expression.

> You will notice that the regular expression is explicitly anchored (with `^` and `$`): in JSON Schema, regular expressions (in `patternProperties` and in `pattern`) are not anchored by default.
Expand Down Expand Up @@ -104,11 +104,11 @@ We saw these keywords in the prior exercise: `$id`, `$schema`, `type`, `required

To this we add:

* The [`description`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.10.1) annotation keyword.
* The [`oneOf`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.7.3) keyword.
* The [`$ref`](http://json-schema.org/latest/json-schema-core.html#rfc.section.8.3) keyword.
* The [`description`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.10.1) annotation keyword.
* The [`oneOf`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.7.3) keyword.
* The [`$ref`](https://json-schema.org/latest/json-schema-core.html#rfc.section.8.3) keyword.
* In this case, all references used are local to the schema using a relative fragment URI (`#/...`).
* The [`definitions`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.9) keyword.
* The [`definitions`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.9) keyword.
* Including several key names which we will define later.

```json
Expand Down Expand Up @@ -142,12 +142,12 @@ To this we add:

Let's now extend this skeleton to add constraints to some of the properties.

* Our `fstype` key uses the [`enum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.2) validation keyword.
* Our `fstype` key uses the [`enum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.2) validation keyword.
* Our `options` key uses the following:
* The `type` validation keyword (see above).
* The [`minItems`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.4) validation keyword.
* The [`items`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.1) validation keyword.
* The [`uniqueItems`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.5) validation keyword.
* The [`minItems`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.4) validation keyword.
* The [`items`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.1) validation keyword.
* The [`uniqueItems`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.5) validation keyword.
* Together these say: `options` must be an array, and the items therein must be strings, there must be at least one item, and all items should be unique.
* We have a `readonly` key.

Expand Down Expand Up @@ -198,7 +198,7 @@ With these added constraints, the schema now looks like this:

One new keyword is introduced here:

* The [`pattern`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.3.3) validation keyword notes the `device` key must be an absolute path starting with */dev*.
* The [`pattern`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.3.3) validation keyword notes the `device` key must be an absolute path starting with */dev*.

```json
{
Expand Down Expand Up @@ -246,7 +246,7 @@ We do have a new key: `label` and the `pattern` validation keyword states it mus

We find another new keyword:

* The [`format`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.7) annotation and assertion keyword.
* The [`format`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.7) annotation and assertion keyword.

```json
{
Expand Down Expand Up @@ -276,8 +276,8 @@ We find another new keyword:

Our last definition introduces two new keywords:

* The [`minimum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.4) validation keyword.
* The [`maximum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.2) validation keword.
* The [`minimum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.4) validation keyword.
* The [`maximum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.2) validation keword.
* Together these require the size be between 16 and 512, inclusive.

```json
Expand Down
32 changes: 16 additions & 16 deletions learn/getting-started-step-by-step.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ title: Getting Started Step-By-Step

## <a name="intro"></a>Introduction

The following example is by no means definitive of all the value JSON Schema can provide. For this you will need to go deep into the specification itself -- learn more at [http://json-schema.org/specification.html](http://json-schema.org/specification.html).
The following example is by no means definitive of all the value JSON Schema can provide. For this you will need to go deep into the specification itself -- learn more at [https://json-schema.org/specification.html](https://json-schema.org/specification.html).

Let's pretend we're interacting with a JSON based product catalog. This catalog has a product which has:

Expand Down Expand Up @@ -50,10 +50,10 @@ We start with four properties called **keywords** which are expressed as [JSON](

> Yes. the standard uses a JSON data document to describe data documents, most often that are also JSON data documents but could be in any number of other content types like `text/xml`.

* The [`$schema`](http://json-schema.org/latest/json-schema-core.html#rfc.section.7) keyword states that this schema is written according to a specific draft of the standard and used for a variety of reasons, primarily version control.
* The [`$id`](http://json-schema.org/latest/json-schema-core.html#rfc.section.8.2) keyword defines a URI for the schema, and the base URI that other URI references within the schema are resolved against.
* The [`title`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.10.1) and [`description`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.10.1) annotation keywords are descriptive only. They do not add constraints to the data being validated. The intent of the schema is stated with these two keywords.
* The [`type`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.1) validation keyword defines the first constraint on our JSON data and in this case it has to be a JSON Object.
* The [`$schema`](https://json-schema.org/latest/json-schema-core.html#rfc.section.7) keyword states that this schema is written according to a specific draft of the standard and used for a variety of reasons, primarily version control.
* The [`$id`](https://json-schema.org/latest/json-schema-core.html#rfc.section.8.2) keyword defines a URI for the schema, and the base URI that other URI references within the schema are resolved against.
* The [`title`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.10.1) and [`description`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.10.1) annotation keywords are descriptive only. They do not add constraints to the data being validated. The intent of the schema is stated with these two keywords.
* The [`type`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.1) validation keyword defines the first constraint on our JSON data and in this case it has to be a JSON Object.

```json
{
Expand All @@ -67,20 +67,20 @@ We start with four properties called **keywords** which are expressed as [JSON](

We introduce the following pieces of terminology when we start the schema:

* [Schema Keyword](http://json-schema.org/latest/json-schema-core.html#rfc.section.4.3.1): `$schema` and `$id`.
* [Schema Annotations](http://json-schema.org/latest/json-schema-validation.html#rfc.section.10): `title` and `description`.
* [Validation Keyword](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6): `type`.
* [Schema Keyword](https://json-schema.org/latest/json-schema-core.html#rfc.section.4.3.1): `$schema` and `$id`.
* [Schema Annotations](https://json-schema.org/latest/json-schema-validation.html#rfc.section.10): `title` and `description`.
* [Validation Keyword](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6): `type`.

## <a name="properties"></a>Defining the properties

`productId` is a numeric value that uniquely identifies a product. Since this is the canonical identifier for a product, it doesn't make sense to have a product without one, so it is required.

In JSON Schema terms, we update our schema to add:

* The [`properties`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.4) validation keyword.
* The [`properties`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.4) validation keyword.
* The `productId` key.
* `description` schema annotation and `type` validation keyword is noted -- we covered both of these in the previous section.
* The [`required`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.3) validation keyword listing `productId`.
* The [`required`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.3) validation keyword listing `productId`.


```json
Expand Down Expand Up @@ -130,8 +130,8 @@ In JSON Schema terms, we update our schema to add:
According to the store owner there are no free products. ;)

* The `price` key is added with the usual `description` schema annotation and `type` validation keywords covered previously. It is also included in the array of keys defined by the `required` validation keyword.
* We specify the value of `price` must be something other than zero using the [`exclusiveMinimum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.5) validation keyword.
* If we wanted to include zero as a valid price we would have specified the [`minimum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.4) validation keyword.
* We specify the value of `price` must be something other than zero using the [`exclusiveMinimum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.5) validation keyword.
* If we wanted to include zero as a valid price we would have specified the [`minimum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.4) validation keyword.

```json
{
Expand Down Expand Up @@ -172,9 +172,9 @@ Therefore:

* The `tags` key is added with the usual annotations and keywords.
* This time the `type` validation keyword is `array`.
* We introduce the [`items`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.1) validation keyword so we can define what appears in the array. In this case: `string` values via the `type` validation keyword.
* The [`minItems`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.4) validation keyword is used to make sure there is at least one item in the array.
* The [`uniqueItems`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.5) validation keyword notes all of the items in the array must be unique relative to one another.
* We introduce the [`items`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.1) validation keyword so we can define what appears in the array. In this case: `string` values via the `type` validation keyword.
* The [`minItems`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.4) validation keyword is used to make sure there is at least one item in the array.
* The [`uniqueItems`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.4.5) validation keyword notes all of the items in the array must be unique relative to one another.
* We did not add this key to the `required` validation keyword array because it is optional.

```json
Expand Down Expand Up @@ -276,7 +276,7 @@ So far our JSON schema has been wholly self contained. It is very common to shar

For this example we introduce a new JSON Schema resource and for both properties therein:
* We use the `minimum` validation keyword noted earlier.
* We add the [`maximum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.2) validation keyword.
* We add the [`maximum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.2) validation keyword.
* Combined, these give us a range to use in validation.

```json
Expand Down
24 changes: 12 additions & 12 deletions learn/miscellaneous-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ title: Miscellaneous Examples

This example provides a typical minimum you are likely to see in JSON Schema. It contains:

* [`$id`](http://json-schema.org/latest/json-schema-core.html#rfc.section.8.2) keyword
* [`$schema`](http://json-schema.org/latest/json-schema-core.html#rfc.section.7) keyword
* [`title`](http://json-schema.org/latest/json-schema-hypermedia.html#rfc.section.6.5.1) annotation keyword
* [`type`](http://json-schema.org/latest/json-schema-core.html#rfc.section.4.2.1) instance data model
* [`properties`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.4) validation keyword
* [`$id`](https://json-schema.org/latest/json-schema-core.html#rfc.section.8.2) keyword
* [`$schema`](https://json-schema.org/latest/json-schema-core.html#rfc.section.7) keyword
* [`title`](https://json-schema.org/latest/json-schema-hypermedia.html#rfc.section.6.5.1) annotation keyword
* [`type`](https://json-schema.org/latest/json-schema-core.html#rfc.section.4.2.1) instance data model
* [`properties`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.4) validation keyword
* Three keys: `firstName`, `lastName` and `age` each with their own:
* [`description`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.10.1) annotation keyword.
* [`description`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.10.1) annotation keyword.
* `type` instance data model (see above).
* [`minimum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.4) validation keyword on the `age` key.
* [`minimum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.4) validation keyword on the `age` key.

```json
{
Expand Down Expand Up @@ -55,9 +55,9 @@ This example provides a typical minimum you are likely to see in JSON Schema. It

This example introduces:

* [`required`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.3) validation keyword
* [`minimum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.4) validation keyword
* [`maximum`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.2) validation keyword
* [`required`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.3) validation keyword
* [`minimum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.4) validation keyword
* [`maximum`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.2.2) validation keyword

```json
{
Expand Down Expand Up @@ -100,8 +100,8 @@ Arrays are fundamental structures in JSON -- here we demonstrate a couple of way

We also introduce the following with this example:

* [`definitions`](http://json-schema.org/latest/json-schema-validation.html#rfc.section.9) keyword
* [`$ref`](http://json-schema.org/latest/json-schema-core.html#rfc.section.8.3) keyword
* [`definitions`](https://json-schema.org/latest/json-schema-validation.html#rfc.section.9) keyword
* [`$ref`](https://json-schema.org/latest/json-schema-core.html#rfc.section.8.3) keyword

```json
{
Expand Down