[x3d-public] Some schema validators balk on NavigationInfo @type

Don Brutzman brutzman at nps.edu
Thu Feb 23 07:32:21 PST 2017


On 2/23/2017 4:03 AM, yottzumm at gmail.com wrote:
> Okay, all the parseable 3.3 json documents in the x3d resources json examples are valid X3D JSON documents with the everit 1.5.0 schema validator (previously was validated at 1.2.0) and the new 3.3 JSON schema.  There are still many outstanding json documents with 3.0, 3.1, and 3.2 versions that need either a better schema (I have some partial ones) or they need to be fixed (a different stylesheet?).

Each XML Schema validates all preceding versions.  Don't need to shuffle schemas based on versions.

Another option is to upgrade examples v3.0 - v3.2 to v3.3.  in most cases that just means changing the value since backwards compatibility is pretty comprehensive.  nevertheless have resisted changing things for cosmetic reasons, older examples are each a good snapshot in time.

maintaining Roy's manually created JSON schema is a good idea, but I recommend holding off on any major rework while JSON schema specification itself is in flux.  worthy/efficient future work will be to autogenerate it from X3D Object Model.

> Is the current JSON 3.3 schema complete?  Can we move onto other versions yet?  I guess we need more negative cases, if no invalid ones are reported?
>
>
>
> The JavaScript validator script seems to be hanging.  I’m trying to get a handle on what’s causing it to hang.
>
>
>
> This script hangs with Node.js (any I tried), Windows 10, and Cygwin and git bash.
>
>
>
> yes | xargs node fillbuffer.js | tee xxx
>
>
>
> where fillbuffer.js contains:
>
>
>
> console.log(0);
>
>
>
> And equivalent command based on sh and echo succeed.  So I think it’s node.js
>
>
>
> I think this may impact many of my scripts.  I may search for another solution (power shell, windows Ubuntu, give up on windows entirely as a sham of an OS).  Now especially since I can’t copy from vim in a git bash window.  And I upgraded to solve the above problem.  Sigh.  Microsoft sucks.  IEHO.
>
>
>
> John
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>
>
>
> *From: *yottzumm at gmail.com <mailto:yottzumm at gmail.com>
> *Sent: *Wednesday, February 22, 2017 5:25 PM
> *To: *Roy Walmsley <mailto:roy.walmsley at ntlworld.com>; X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
> *Subject: *Some schema validators balk on NavigationInfo @type
>
>
>
> I’ve been working with the new JSON schema.  The jjv validator does not handle a NavigatorInfo @type field of “NONE”.    However, the schema appears to be the same as in the old schema.  I think there must be a new version of jjv that might be failing.  I will try to file a bug report.
>
>
>
> Here is the jjv bug.  I may have fixed this before, I don’t know.  Perhaps I can get the code from my mac.   Note that jjv is no longer mentioned on the json-schema.org site, and I will remove it from my code.  I will try to replace with others as they become more mature (version 5 etc).  Ajv seems to be reportedly the most advanced.
>
>
>
> jjv 3.3 Validation failed on ../X3DJSONLD/www.web3d.org/x3d/content/examples/Basic/Followers/3rdPersonViewFollower.json
>
> jjv 3.3 Validation errors:
>
> {"validation":{"X3D":{"schema":{"Scene":{"schema":{"-children":{"schema":{"0":{"schema":{"NavigationInfo":{"schema":{"@type":{"schema":{"1":{"type":"string"}}}}}}}}}}}}}}}
>
> Here is the schema:
>
>
>
>
>
>   "NavigationInfo": {
>
>                         "type": "object",
>
>                         "properties": {
>
>                                 "@type": {
>
>                                         "type": "array",
>
>                                         "minItems": 1,
>
>                                         "items": [
>
>                                                 {
>
>                                                         "type": "string",
>
>                                                         "default": "EXAMINE"
>
>                                                 },
>
>                                                 {
>
>                                                         "type": "string",
>
>                                                         "default": "ANY"
>
>                                                 }
>
>                                         ],
>
>                                         "additionalItems": {
>
>                                                 "type": "string"
>
>                                         }
>
>                                 },
>
>
>
>
>
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>


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 http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list