[x3d-public] Penultimate report, Re: Latest X3DV4 JSON schema (check date)

John Carlson yottzumm at gmail.com
Tue Apr 27 00:14:18 PDT 2021


I'm hoping Don can provide the proper stack space requirements for 
Everit.  That would be good to document somewhere and get into test 
scripts.  I'm trying 1GB.

I will work on creating a better way to test JavaScript versus Java 
results at sometime time range in the future.   What I will do right now 
is send the JSON file to the x3dvalidate command-line validator (see 
results below everit log).  You will find the x3dschema Ajv validator 
will only report things that differ between the hand-generated (now 
deprecated) and auto-generated schema.  There will likely be a large 
change in x3dschema to no longer compare against hand-generated 
schemas.   what I will try to do is create a good way to deal with 
updating versions, and comparing between X3D versions. (4.0 versus 4.X).


json-schema 4.0 Validation error 
org.everit.json.schema.InternalValidationException: 
#/X3D/Scene/-children/2/Viewpoint: #: only 1 subschema matches out of 2 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
json-schema 4.0 Validation error 
org.everit.json.schema.InternalValidationException: 
#/X3D/Scene/-children/3/Transform: #: only 1 subschema matches out of 2 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
json-schema 4.0 Validation error 
org.everit.json.schema.InternalValidationException: 
#/X3D/Scene/-children/4/Transform: #: only 1 subschema matches out of 2 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
json-schema 4.0 Validation error 
org.everit.json.schema.InternalValidationException: 
#/X3D/Scene/-children/5/Transform: #: only 1 subschema matches out of 2 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
json-schema 4.0 Validation error 
org.everit.json.schema.InternalValidationException: 
#/X3D/Scene/-children/13/AudioDestination: #: only 1 subschema matches 
out of 2 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json

I will check in results into github.com/coderextreme/x3dschema.

Here's the Ajv validator report on the file:

$ node x3dvalidate.js 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json 

Loading schema
Parsing schema
Adding schema
Schema 4.0 added
Schema 4.0 compiled
================================================================================
File: 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
Error reading 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json 

  keyword: additionalProperties
  dataPath: X3D > Scene > -children > 2 > Viewpoint
  value: 
{"@bind":true,"@orientation":"|omitted|","@position":"|omitted|","@retainUserOffsets":true}
  message: should not have additional properties
  params: {"additionalProperty":"@bind"}
  file: 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
  version: 4.0

  keyword: additionalProperties
  dataPath: X3D > Scene > -children > 2 > Viewpoint
  value: 
{"@bind":true,"@orientation":"|omitted|","@position":"|omitted|","@retainUserOffsets":true}
  message: should not have additional properties
  params: {"additionalProperty":"@bind"}
  file: 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
  version: 4.0

  keyword: oneOf
  dataPath: X3D > Scene > -children > 2 > Viewpoint
  value: 
{"@bind":true,"@orientation":"|omitted|","@position":"|omitted|","@retainUserOffsets":true}
  message: should match exactly one schema in "oneOf"
  params: {"passingSchemas":null}
  file: 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
  version: 4.0

==========================================

Here's the commands to run x3dvalidate:


$ git clone https://github.com/coderextreme/x3dvalidate
$ cd x3dvalidate
$ npm install
$ node x3dvalidate.js flipper.json ... (other JSON files).


Updates, enhancements to x3dvalidate welcome.


Note, as far as I can tell, Ajv is MUCH faster than everit, so you may 
consider that when validating large numbers of files.  It looks like 
everit reports more errors than Ajv.  Plus, as far as I can tell, Ajv 
stack space doesn't need to be configured.  Don't forget to revalidate 
after fixing validation errors.


I'm hoping that I won't have to come out with another report, I just 
used penultimate because it's way cooler than final.  I will report on 
any StackOverflowErrors I get.

John

On 4/26/21 10:29 PM, John Carlson wrote:
>
> Getting some Validation errors:
>
>  grep Validation javaresults.txt
>
> <pre>
>
> json-schema 3.1 Validation error 
> org.everit.json.schema.InternalValidationException: 
> #/X3D/Scene/-children/3/CADAssembly: #: 0 subschemas matched instead 
> of one 
> /c/x3d-code/www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeB.json
> json-schema 3.1 Validation error 
> org.everit.json.schema.InternalValidationException: 
> #/X3D/Scene/-children/3/CADAssembly: #: 0 subschemas matched instead 
> of one 
> /c/x3d-code/www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeC.json
> json-schema 4.0 Validation error 
> org.everit.json.schema.InternalValidationException: 
> #/X3D/Scene/-children/2/Viewpoint: #: only 1 subschema matches out of 
> 2 
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
> json-schema 4.0 Validation error 
> org.everit.json.schema.InternalValidationException: 
> #/X3D/Scene/-children/3/Transform: #: only 1 subschema matches out of 
> 2 
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
> json-schema 4.0 Validation error 
> org.everit.json.schema.InternalValidationException: 
> #/X3D/Scene/-children/4/Transform: #: only 1 subschema matches out of 
> 2 
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
> json-schema 4.0 Validation error 
> org.everit.json.schema.InternalValidationException: 
> #/X3D/Scene/-children/5/Transform: #: only 1 subschema matches out of 
> 2 
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
> json-schema 4.0 Validation error 
> org.everit.json.schema.InternalValidationException: 
> #/X3D/Scene/-children/13/AudioDestination: #: only 1 subschema matches 
> out of 2 
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/Filters.json
> json-schema 4.0 Validation error 
> org.everit.json.schema.InternalValidationException: 
> #/X3D/Scene/-children/1/Shape: #: 0 subschemas matched instead of one 
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/AllAudioGraphNodesTest.json
>
> </pre>
>
> On 4/26/21 10:25 PM, John Carlson wrote:
>>
>> Lots of validations are coming through now, with latest draft 07, 
>> latest everit.   I don't know if I'll get any errors, because the 
>> everit run takes so long, and there's a StackOverflowError, but I am 
>> getting passing JSON files, so it looks okay.
>>
>> Check out:
>>
>> https://github.com/coderextreme/x3dschema
>>
>> The latest logs have not been checked in yet. TBD.
>>
>> I don't see anything significant that changed, except I don't version 
>> control everit.  I assert that the version I have seems to work 
>> except for StackOverflowErrors.
>>
>> With the valid reports, I think it's likely we can track down the 
>> StackOverflow errors.  Probably we should print out the file before 
>> validating it.
>>
>> Forks and pull requests welcome!
>>
>> John
>>
>> On 4/26/21 10:14 PM, John Carlson wrote:
>>>
>>> I backed out the change to the draft 07 schema, and put a printout 
>>> for when the X3D JSON example passed, and got confirmation that the 
>>> files were validated.  I did get one stack overflow, which in my 
>>> case, might have dropped a lot of files, since I process them in 
>>> batches.
>>>
>>> Hmm.  I don't think I can catch a Stack Overflow Exception?
>>>
>>> I will put the change to draft 07 schema back in and retest with the 
>>> "valid" log in place.
>>>
>>> John
>>>
>>> On 4/26/21 9:54 PM, John Carlson wrote:
>>>>
>>>> Indeed, there was a change!!!! to draft 07 JSON schema!
>>>>
>>>> Here's the diff:
>>>>
>>>> $ git diff -w json*
>>>> diff --git a/json-schema-draft-07.json b/json-schema-draft-07.json
>>>> index 5bee90e..fb92c7f 100644
>>>> --- a/json-schema-draft-07.json
>>>> +++ b/json-schema-draft-07.json
>>>> @@ -64,6 +64,10 @@
>>>>              "type": "boolean",
>>>>              "default": false
>>>>          },
>>>> +        "writeOnly": {
>>>> +            "type": "boolean",
>>>> +            "default": false
>>>> +        },
>>>>          "examples": {
>>>>              "type": "array",
>>>>              "items": true
>>>>
>>>> I don't think this will affect X3D JSON schema, but it may affect 
>>>> everit and Ajv.
>>>>
>>>> Good catch!
>>>>
>>>> Retesting...
>>>>
>>>> John
>>>>
>>>> On 4/26/21 9:32 PM, John Carlson wrote:
>>>>> Classpath which contains jars to download found in validate.sh in 
>>>>> x3dschema repository under my coderextreme account on GitHub.com
>>>>>
>>>>> John
>>>>>
>>>>> On Mon, Apr 26, 2021 at 7:32 PM John Carlson <yottzumm at gmail.com 
>>>>> <mailto:yottzumm at gmail.com>> wrote:
>>>>>
>>>>>     https://github.com/coderextreme/x3dschema/blob/master/validate.sh
>>>>>     <https://github.com/coderextreme/x3dschema/blob/master/validate.sh>
>>>>>
>>>>>     (Check CLASSPATH above, and location to download everit if
>>>>>     building everit from source.
>>>>>
>>>>>     There are additional jars for running everit, to verify my
>>>>>     classpath, check everit’s pom.xml files.
>>>>>
>>>>>     Next I will look into everit releases.
>>>>>
>>>>>     John
>>>>>
>>>>>     On Mon, Apr 26, 2021 at 7:24 PM John Carlson
>>>>>     <yottzumm at gmail.com <mailto:yottzumm at gmail.com>> wrote:
>>>>>
>>>>>         https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/schema/x3d-4.0-JSONSchema.json
>>>>>         <https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/schema/x3d-4.0-JSONSchema.json>
>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210427/242d65d2/attachment-0001.html>


More information about the x3d-public mailing list