Skip to content

Commit

Permalink
[#418,dr,!][s]: change DR schema strings to be like data locators (UR…
Browse files Browse the repository at this point in the history
…L or relative path).

This eliminate the last usage of JSON pointer in the spec and simplifies life for implementors.
  • Loading branch information
rufuspollock committed May 18, 2017
1 parent 7f23edf commit 89295ac
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions content/data-resource/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ A descriptor MAY contain any number of additional properties. Common properties

A Data Resource MAY have a `schema` property to describe the schema of the resource data.

The value for the `schema` property on a `resource` MUST be an `object` or a string that "references" an Object as detailed below.
The value for the `schema` property on a `resource` MUST be an `object` representing the schema OR a `string` that identifies the location of the schema (i.e. the location specified MUST be a JSON document which is the schema).

The restrictions on a `string` value are the same as those [defined above for the `path` data locator strings](#path-data-in-files) -- that is a fully qualified URL or a relative unix-style path.

<div class="alert" markdown="block">
NOTE: the Data Package specification places no restrictions on the form of this
Expand All @@ -270,17 +272,6 @@ Package][tdp] specification requires the schema value to conform to [Table
Schema][jts].
</div>

## Schema References

If `schema` is a string it is a "reference" to an Object and MUST be a URL. The URL MUST:

* EITHER: resolve to a JSON document that is the schema
* OR: include a fragment identifier which conforms to to [JSON
Pointer](http://tools.ietf.org/html/rfc6901) notation. The URL must then
resolve to a JSON document and the schema is obtained by resolving within
that JSON document using the fragment identifier as the JSON pointer as per
section 6 of the JSON pointer specification. URL.

[tdp]: /tabular-data-package/
[jts]: /table-schema/
[iana]: http://www.iana.org/assignments/character-sets/character-sets.xhtml
Expand Down

0 comments on commit 89295ac

Please sign in to comment.