Last active
December 16, 2015 10:29
-
-
Save TakashiSasaki/5420814 to your computer and use it in GitHub Desktop.
対象物とメタデータを関連付けるオブジェクト
http://jsonschemalint.com/ でバリデート済み。
*.jsはJSONP版。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-03/schema", | |
"id": "https://gist.github.com/TakashiSasaki/5420814/raw/schema.json", | |
"title": "root", | |
"title-authority": [ | |
"http://json-schema.org/latest/json-schema-validation.html#anchor97", | |
"http://json-schema.org/latest/json-schema-core.html#anchor7" | |
], | |
"title-description": "Title is a metadata keyword and will preferrably be short.", | |
"description": null, | |
"description-autority": [ | |
"http://json-schema.org/latest/json-schema-validation.html#anchor97" | |
], | |
"description-description": "A description will provide explanation about the purpose of the instance described by this schema.", | |
"type": "object", | |
"type-authority": [ | |
"http://json-schema.org/latest/json-schema-core.html#anchor8" | |
], | |
"type-description": null, | |
"arbitrary-property": "JSON schema allows arbitrary properties not described in the specifications.", | |
"subjectMetadata": { | |
"title": "subjectMetadata", | |
"type": "object", | |
"description": "対象物とメタデータを関連付けるオブジェクト", | |
"properties": { | |
"subjects": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"subjects-authority": null, | |
"subjects-description": null, | |
"metadata": { | |
"type": "string" | |
}, | |
"metadata-authority": null, | |
"metadata-description": null | |
}, | |
"required": [ | |
"subjects", | |
"metadata" | |
], | |
"required-authority": [ | |
"http://json-schema.org/latest/json-schema-hypermedia.html#rfc.section.5.1.1.3" | |
] | |
}, | |
"locationMetadata": { | |
"title": "locationMetadata", | |
"type": "object", | |
"description": "対象物を発見するためのメタデータ", | |
"properties": {}, | |
"required": [] | |
}, | |
"links": [ | |
{ | |
"rel": "full", | |
"rel-authority": [ | |
"http://json-schema.org/latest/json-schema-hypermedia.html#anchor27" | |
], | |
"full-description": "This indicates that the target of the link is the full representation for the instance object. The instance that contains this link may not be the full representation.", | |
"href": "{id}", | |
"href-authority": [ | |
"http://json-schema.org/latest/json-schema-hypermedia.html#href" | |
], | |
"href-description": "The value of the href link description property is a template used to determine the target URI of the related resource." | |
}, | |
{ | |
"rel": "describedBy", | |
"describedBy-description": "This indicates the target of the link is a schema describing the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures.", | |
"href": "{+($schema)}" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XbcG({ | |
"$schema":"http://json-schema.org/draft-03/schema", | |
"title":"root", | |
"description":"aaa", | |
"type":"object", | |
"a":"a", | |
"properties":{ | |
"subjects":{ | |
"description":"none", | |
"type":"array", | |
"items":{ | |
"type":"string" | |
}, | |
"required":true | |
}, | |
"metadata":{ | |
"type":"string", | |
"required":true | |
} | |
}, | |
"links":[ | |
{ | |
"rel":"describedBy", | |
"href":"{+($schema)}" | |
} | |
] | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema":"https://gist.github.com/TakashiSasaki/5420814/raw/schema.json", | |
"subjects":[ | |
"a", | |
"b" | |
], | |
"metadata":"xyz" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment