[x3d-public] X3D JSON Schema updated for axis++ defaults
John Carlson
yottzumm at gmail.com
Sat Feb 5 08:25:54 PST 2022
3. It may be possible to do something like
“default” : [ 0, 1, 0 ]
But this is an unknown at this point and would require testing. I don’t
think default values are tested in JSON schema validation , so we may be
able to do what we like. There are other JSON schema tools which use this
kind of info we may want to leverage.
I agree that the above is much more readable.
I’ve been pretty desperate to create something that the schema validators
accept, but the validators seem to accept more and more as I am patient.
If we can create a representative set of examples (ConformanceNist?) and
possible schema that we desire, that would be good feedback for the
standards creators and validation teams.
On Sat, Feb 5, 2022 at 9:06 AM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:
> I’ve updated your latest version in sourceforge. Several comments.
>
>
>
> 1. Still not seeing anything in your header about date produced. This is
> a recipe for future versionitis problems. Please add that.
>
>
>
> Perhaps trivial but better title follows (start with subject and then add
> amplifying information)
>
>
>
> - "title": "X3D V4.0 JSON Schema ",
>
>
>
> Excerpt:
>
> {
>
> "$schema": https://json-schema.org/draft/2020-12/schema,
>
> "$id": https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json,
>
> "title": "JSON Schema X3D V4.0",
>
> "description": "Experimental JSON Schema for X3D V4.0",
>
> "type": "object",
>
> "properties": {
>
> "X3D": {
>
> "$ref": "#/$defs/X3D"
>
> }
>
> },
>
>
>
> 2. Saw a documentation problem: USE nodes can’t indicate anything besides
> the @USE value (except for containerField value for relevant parent-child
> relationship in XML encoding). So your following guidance about comments
> is not portable outside of JSON.
>
> "RigidBody": {
>
> "type": "object",
>
> "oneOf": [
>
> {
>
> "type": "object",
>
> "properties": {
>
> "@class": {
>
> "type": "string"
>
> },
>
> "@USE": {
>
> "type": "string"
>
> },
>
> "-children": {
>
> "type": "array",
>
> "minItems": 1,
>
> "items": {
>
> "type": "object",
>
> "properties": {
>
> "#comment": {
>
> "type": "string",
>
> "$comment": "#comment statements are the only allowed
> in -children node when using a USE field"
>
> }
>
> },
>
> "additionalProperties": false
>
> }
>
> }
>
> },
>
> "required": [
>
> "@USE"
>
> ],
>
> "additionalProperties": false
>
> },
>
>
>
> 3. Also looked at how array defaults like 0 1 0 might be defined. Looks
> gnarly. Somewhat surprised you have to do this one-by-one.
>
> "@finiteRotationAxis": {
>
> "$comment": "SFVec3f inputOutput",
>
> "type": "array",
>
> "minItems": 3,
>
> "maxItems": 3,
>
> "prefixItems": [
>
> {
>
> "default": 0,
>
> "type": "number"
>
> },
>
> {
>
> "default": 1,
>
> "type": "number"
>
> },
>
> {
>
> "default": 0,
>
> "type": "number"
>
> }
>
> ],
>
> "items": false
>
> },
>
>
>
> Thanks for these continuing update efforts.
>
>
>
> all the best, Don
>
> --
>
> Don Brutzman Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
>
> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
>
> X3D graphics, virtual worlds, Navy robotics https://
> faculty.nps.edu/brutzman
>
>
>
> *From:* John Carlson <carlsonsolutiondesign at gmail.com>
> *Sent:* Friday, February 4, 2022 2:23 PM
> *To:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>; X3D Graphics
> public mailing list <x3d-public at web3d.org>
> *Subject:* X3D JSON Schema updated for axis++ defaults
>
> X3D JSON Schema updated per changes in RBP default values:
>
>
>
>
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/schema/x3d-4.0-JSONSchema.json
>
>
>
> Enjoy!
>
>
>
> Tested against my JSON archive with x3dschema repo. Same files were
> reported with errors (mails from a few days ago). I realize these files
> have been updated, I haven’t recreated or downloaded JSON examples at this
> point, I’m minimizing work done on a physical keyboard. I gave my wife my
> iPad.
>
>
>
> Also, I’ve been adding rules to the X3D JSON schema generator in a new
> file (WIP):
>
>
>
>
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/rules.py
>
>
>
> Current point of work is found by searching for TODO (I think there’s only
> one in the file).
>
>
>
> I’m about ready to nod off for the day, I might do a bit more work after
> 9pm CST.
>
>
>
> John
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220205/761860a9/attachment-0001.html>
More information about the x3d-public
mailing list