Skip to content

Commit

Permalink
v4 JSON schema update (#1)
Browse files Browse the repository at this point in the history
* Upgrade to json schema v4 syntax

* More allOf changes
  • Loading branch information
yucombinator authored Nov 9, 2016
1 parent 1a31159 commit 2f31de5
Show file tree
Hide file tree
Showing 50 changed files with 120 additions and 121 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "KHR_binary_glTF image extension",
"type" : "object",
"properties" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "KHR_binary_glTF shader extension",
"type" : "object",
"properties" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "KHR_materials_common glTF extension",
"type" : "object",
"properties" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "light/ambient",
"type" : "object",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"color" : {
"type" : "array",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "light/directional",
"type" : "object",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"color" : {
"type" : "array",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "light/point",
"type" : "object",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"color" : {
"type" : "array",
Expand Down
12 changes: 6 additions & 6 deletions extensions/Khronos/KHR_materials_common/schema/light.schema.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "light",
"type" : "object",
"description" : "An ambient, directional, point, or spot light.",
"extends" : { "$ref" : "glTFChildOfRootProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFChildOfRootProperty.schema.json" } ],
"properties" : {
"ambient" : {
"extends" : { "$ref" : "light.ambient.schema.json" },
"allOf" : [ { "$ref" : "light.ambient.schema.json" } ],
"description" : "Ambient light source."
},
"directional" : {
"extends" : { "$ref" : "light.directional.schema.json" },
"allOf" : [ { "$ref" : "light.directional.schema.json" } ],
"description" : "Directional light source."
},
"point" : {
"extends" : { "$ref" : "light.point.schema.json" },
"allOf" : [ { "$ref" : "light.point.schema.json" } ],
"description" : "Point light source."
},
"spot" : {
"extends" : { "$ref" : "light.spot.schema.json" },
"allOf" : [ { "$ref" : "light.spot.schema.json" } ],
"description" : "Spot light source."
},
"type" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "light/spot",
"type" : "object",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"color" : {
"type" : "array",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "KHR_materials_common node extension",
"type" : "object",
"properties" : {
"light" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The id of the light referenced by this node."
}
},
Expand Down
2 changes: 1 addition & 1 deletion extensions/Vendor/CESIUM_RTC/CESIUM_RTC.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "CESIUM_RTC",
"type" : "object",
"description" : "glTF CESIUM_RTC extension.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "WEB3D_quantized_attributes accessor extension",
"type" : "object",
"properties" : {
Expand Down
6 changes: 3 additions & 3 deletions specification/schema/accessor.schema.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "accessor",
"type" : "object",
"description" : "A typed view into a bufferView. A bufferView contains raw binary data. An accessor provides a typed view into a bufferView or a subset of a bufferView similar to how WebGL's `vertexAttribPointer()` defines an attribute in a buffer.",
"extends" : { "$ref" : "glTFChildOfRootProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFChildOfRootProperty.schema.json" } ],
"properties" : {
"name" : {},
"extensions" : {},
"extras" : {},
"bufferView" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The ID of the bufferView.",
"required" : true
},
Expand Down
8 changes: 4 additions & 4 deletions specification/schema/animation.channel.schema.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "channel",
"type" : "object",
"description" : "Targets an animation's sampler at a node's property.",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"extensions" : {},
"extras" : {},
"sampler" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The ID of a sampler in this animation used to compute the value for the target.",
"required" : true,
"gltf_detailedDescription" : "The ID of a sampler in this animation used to compute the value for the target, e.g., a node's translation, rotation, or scale (TRS)."
},
"target" : {
"extends" : { "$ref" : "animation.channel.target.schema.json" },
"allOf" : [ { "$ref" : "animation.channel.target.schema.json" } ],
"description" : "The ID of the node and TRS property to target.",
"required" : true
}
Expand Down
6 changes: 3 additions & 3 deletions specification/schema/animation.channel.target.schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "target",
"type" : "object",
"description" : "The ID of the node and TRS property that an animation channel targets.",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"extensions" : {},
"extras" : {},
"id" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The ID of the node to target.",
"required" : true
},
Expand Down
4 changes: 2 additions & 2 deletions specification/schema/animation.parameter.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "parameter",
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The ID of the accessor containing keyframes for this parameter.",
"additionalProperties" : false
}
8 changes: 4 additions & 4 deletions specification/schema/animation.sampler.schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "animation sampler",
"type" : "object",
"description" : "Combines input and output parameters with an interpolation algorithm to define a keyframe graph (but not its target).",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"extensions" : {},
"extras" : {},
"input" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The ID of a parameter in this animation to use as keyframe input, e.g., time.",
"required" : true,
"gltf_detailedDescription" : "The ID of a parameter in this animation to use as keyframe input. This parameter must have type `FLOAT`. The values represent time in seconds with `time[0] >= 0.0`, and monotonically increasing values, i.e., `time[n + 1] >= time[n]`."
Expand All @@ -21,7 +21,7 @@
"gltf_detailedDescription" : "Interpolation algorithm. When an animation targets a node's rotation, and the animation's interpolation is `\"LINEAR\"`, spherical linear interpolation (slerp) should be used to interpolate quaternions."
},
"output" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The ID of a parameter in this animation to use as keyframe output.",
"required" : true
}
Expand Down
4 changes: 2 additions & 2 deletions specification/schema/animation.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "animation",
"type" : "object",
"description" : "A keyframe animation.",
"extends" : { "$ref" : "glTFChildOfRootProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFChildOfRootProperty.schema.json" } ],
"properties" : {
"name": {},
"extensions" : {},
Expand Down
2 changes: 1 addition & 1 deletion specification/schema/arrayValues.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"type" : "array",
"items" : {
"type" : ["number", "boolean", "string"]
Expand Down
4 changes: 2 additions & 2 deletions specification/schema/asset.profile.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "profile",
"type" : "object",
"description" : "Specifies the target rendering API and version, e.g., WebGL 1.0.3.",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"extensions" : {},
"extras" : {},
Expand Down
4 changes: 2 additions & 2 deletions specification/schema/asset.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "asset",
"type" : "object",
"description" : "Metadata about the glTF asset.",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"extensions" : {},
"extras" : {},
Expand Down
4 changes: 2 additions & 2 deletions specification/schema/buffer.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "buffer",
"type" : "object",
"description" : "A buffer points to binary geometry, animation, or skins.",
"extends" : { "$ref" : "glTFChildOfRootProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFChildOfRootProperty.schema.json" } ],
"properties" : {
"name" : {},
"extensions" : {},
Expand Down
6 changes: 3 additions & 3 deletions specification/schema/bufferView.schema.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "bufferView",
"type" : "object",
"description" : "A view into a buffer generally representing a subset of the buffer.",
"extends" : { "$ref" : "glTFChildOfRootProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFChildOfRootProperty.schema.json" } ],
"properties" : {
"name" : {},
"extensions" : {},
"extras" : {},
"buffer" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The ID of the buffer.",
"required" : true
},
Expand Down
4 changes: 2 additions & 2 deletions specification/schema/camera.orthographic.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "orthographic",
"type" : "object",
"description" : "An orthographic camera containing properties to create an orthographic projection matrix.",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"extensions" : {},
"extras" : {},
Expand Down
4 changes: 2 additions & 2 deletions specification/schema/camera.perspective.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "perspective",
"type" : "object",
"description" : "A perspective camera containing properties to create a perspective projection matrix.",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"extensions" : {},
"extras" : {},
Expand Down
8 changes: 4 additions & 4 deletions specification/schema/camera.schema.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "camera",
"type" : "object",
"description" : "A camera's projection. A node can reference a camera ID to apply a transform to place the camera in the scene.",
"extends" : { "$ref" : "glTFChildOfRootProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFChildOfRootProperty.schema.json" } ],
"properties" : {
"name" : {},
"extensions" : {},
"extras" : {},
"orthographic" : {
"extends" : { "$ref" : "camera.orthographic.schema.json" },
"allOf" : [ { "$ref" : "camera.orthographic.schema.json" } ],
"description" : "An orthographic camera containing properties to create an orthographic projection matrix."
},
"perspective" : {
"extends" : { "$ref" : "camera.perspective.schema.json" },
"allOf" : [ { "$ref" : "camera.perspective.schema.json" } ],
"description" : "A perspective camera containing properties to create a perspective projection matrix."
},
"type" : {
Expand Down
2 changes: 1 addition & 1 deletion specification/schema/extension.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "extension",
"type" : "object",
"description" : "Dictionary object with extension-specific objects.",
Expand Down
3 changes: 1 addition & 2 deletions specification/schema/extras.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "extras",
"type" : "any",
"description" : "Application-specific data."
}
8 changes: 4 additions & 4 deletions specification/schema/glTF.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "glTF",
"type" : "object",
"description" : "The root object for a glTF asset.",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"extensions" : {},
"extras" : {},
Expand Down Expand Up @@ -40,7 +40,7 @@
"gltf_detailedDescription" : "A dictionary object of keyframe animations. The name of each animation is an ID in the global glTF namespace that is used to reference the animation."
},
"asset" : {
"extends" : { "$ref" : "asset.schema.json" },
"allOf" : [ { "$ref" : "asset.schema.json" } ],
"description" : "Metadata about the glTF asset.",
"default" : {}
},
Expand Down Expand Up @@ -144,7 +144,7 @@
"gltf_detailedDescription" : "A dictionary object of samplers. The name of each sampler is an ID in the global glTF namespace that is used to reference the sampler. A sampler contains properties for texture filtering and wrapping modes."
},
"scene" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The ID of the default scene."
},
"scenes" : {
Expand Down
4 changes: 2 additions & 2 deletions specification/schema/glTFChildOfRootProperty.schema.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema" : "http://json-schema.org/draft-03/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "Child of a glTF root property",
"type" : "object",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"name" : {
"type" : "string",
Expand Down
Loading

0 comments on commit 2f31de5

Please sign in to comment.