Skip to content

Commit 2b2c537

Browse files
committed
Examples for relative/separate schema in Reference Object
1 parent 9492473 commit 2b2c537

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

versions/2.0.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,27 @@ Field Name | Type | Description
11261126
$ref: '#/definitions/Pet'
11271127
```
11281128

1129+
##### Relative Schema File Example
1130+
```js
1131+
{
1132+
"$ref": "Pet.json"
1133+
}
1134+
```
1135+
1136+
```yaml
1137+
$ref: 'Pet.yaml'
1138+
1139+
##### Relative Files With Embedded Schema Example
1140+
```js
1141+
{
1142+
"$ref": "definitions.json#/Pet"
1143+
}
1144+
```
1145+
1146+
```yaml
1147+
$ref: 'definitions.yaml#/Pet'
1148+
1149+
11291150
#### <a name="schemaObject"></a>Schema Object
11301151

11311152
The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is based on the [JSON Schema Specification Draft 4](http://json-schema.org/) and uses a predefined subset of it. On top of this subset, there are extensions provided by this specification to allow for more complete documentation.

0 commit comments

Comments
 (0)