Skip to content

Commit

Permalink
Add optional response fields and @context
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtich committed Feb 14, 2017
1 parent 85034c7 commit 8e696d0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
6 changes: 6 additions & 0 deletions daia-schema/daia.schema.json
Expand Up @@ -2,6 +2,12 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"$schema": {
"$ref": "#/types/URL"
},
"@context": {
"$ref": "#/types/URL"
},
"document": {
"items": {
"$ref": "#/types/document"
Expand Down
11 changes: 8 additions & 3 deletions daia.md
Expand Up @@ -98,13 +98,15 @@ via <http://viaf.org/viaf/151962300>.

[DAIA Response]: #daia-response

A **DAIA Response** is a JSON object with three OPTIONAL fields:
A **DAIA Response** is a JSON object with one REQUIRED and four OPTIONAL fields:

name type description
----------- -------------------- -------- ----------------------------------------------------------------------
document array of [documents] REQUIRED documents matching the processed [request identifiers]
institution [entity] OPTIONAL institution that grants or knows about services and their availability
timestamp datetime OPTIONAL time the DAIA Response was generated
$schema URL OPTIONAL link to a JSON Schema document
@context URL OPTIONAL link to a JSON-LD context document
----------- -------------------- -------- ----------------------------------------------------------------------

A DAIA Response sent by a DAIA server in response to a request MUST only
Expand Down Expand Up @@ -1133,9 +1135,12 @@ The format a DAIA profile has not been specified yet. See
* Davis, M. and Whistler, K.: “Unicode Normalization Forms”.
Unicode Standard Annex #15. <http://www.unicode.org/reports/tr15/>.
* Galiegue, F. and Zyp, K. 2013: "JSON Schema v4".
* Galiegue, F. and Zyp, K. 2013: JSON Schema v4.
<http://json-schema.org/latest/json-schema-core.html>.
* Sporny, M. et al., 2014: “JSON-LD 1.0”.
<https://www.w3.org/TR/json-ld/>
* Voß, J. 2015. “Patrons Account Information API (PAIA)”
<http://gbv.github.io/paia/>.
Expand Down Expand Up @@ -1173,6 +1178,7 @@ included at <https://github.com/gbv/daia/releases> with release notes.
#### 0.9.10 (2017-02-??) {.unnumbered}
* Make item id and entity id RECOMMENDED (#33)
* Add OPTIONAL response fields `$schema` and `@context`
* Update JSON Schema
#### 0.9.9 (2016-02-26) {.unnumbered}
Expand Down Expand Up @@ -1290,7 +1296,6 @@ The following JSON Schema [`daia.schema.json`](daia.schema.json) can be used
to validate [DAIA Response] format without [integrity rules].

`daia-schema/daia.schema.json`{.include .codeblock .json}
`daia.schema.json`{.include .codeblock .json}

# Acknowledgements

Expand Down
1 change: 1 addition & 0 deletions examples/response-1.json
@@ -1,4 +1,5 @@
{
"$schema": "http://gbv.github.io/daia/daia.schema.json",
"institution": {
"content": "Staats- und Universitätsbibliothek Hamburg",
"href": "http://www.sub.uni-hamburg.de/"
Expand Down
1 change: 1 addition & 0 deletions examples/response-2.json
@@ -1,4 +1,5 @@
{
"$schema": "http://gbv.github.io/daia/daia.schema.json",
"document": [
{
"id": "urn:isbn:978-3-531-18621-4",
Expand Down

0 comments on commit 8e696d0

Please sign in to comment.