Skip to content

Commit 3fc3a6c

Browse files
committed
Complete rework of JSON Reference
1 parent f459807 commit 3fc3a6c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

versions/3.0.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,10 +2212,9 @@ definitions:
22122212
22132213
#### <a name="referenceObject"></a>Reference Object
22142214
2215-
A simple object to allow referencing other definitions in the specification.
2216-
It can be used to reference parameters and responses that are defined at the top level for reuse.
2215+
A simple object to allow referencing other definitions in the specification, internally and externally.
22172216
2218-
The Reference Object is a [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) that uses a [JSON Pointer](http://tools.ietf.org/html/rfc6901) as its value.
2217+
The Reference Object is defined by [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) and follows the same structure, behavior and rules.
22192218
22202219
For this specification, reference resolution is done as defined by the JSON Reference specification and not by the JSON Schema specification.
22212220
@@ -2228,12 +2227,12 @@ Field Name | Type | Description
22282227

22292228
```json
22302229
{
2231-
"$ref": "#/definitions/Pet"
2230+
"$ref": "#/components/definitions/Pet"
22322231
}
22332232
```
22342233

22352234
```yaml
2236-
$ref: '#/definitions/Pet'
2235+
$ref: '#/components/definitions/Pet'
22372236
```
22382237

22392238
##### Relative Schema File Example
@@ -2244,7 +2243,7 @@ $ref: '#/definitions/Pet'
22442243
```
22452244

22462245
```yaml
2247-
$ref: 'Pet.yaml'
2246+
$ref: Pet.yaml
22482247
```
22492248

22502249
##### Relative Files With Embedded Schema Example
@@ -2255,7 +2254,7 @@ $ref: 'Pet.yaml'
22552254
```
22562255

22572256
```yaml
2258-
$ref: 'definitions.yaml#/Pet'
2257+
$ref: definitions.yaml#/Pet
22592258
```
22602259

22612260
#### <a name="schemaObject"></a>Schema Object

0 commit comments

Comments
 (0)