Skip to content

Commit fdd8ca6

Browse files
committed
Merge pull request OAI#387 from jasonh-n-austin/develop_2.0
Examples for relative/separate schema in Reference Object
2 parents 7926841 + 39e71ab commit fdd8ca6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

versions/2.0.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,28 @@ 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+
1140+
##### Relative Files With Embedded Schema Example
1141+
```js
1142+
{
1143+
"$ref": "definitions.json#/Pet"
1144+
}
1145+
```
1146+
1147+
```yaml
1148+
$ref: 'definitions.yaml#/Pet'
1149+
```
1150+
11291151
#### <a name="schemaObject"></a>Schema Object
11301152

11311153
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)