[x3d-public] Meeting to discuss Ajv JSON schema validation warnings, and improving them

Don Brutzman brutzman at nps.edu
Thu Mar 30 09:58:57 PDT 2017


cc: x3d-public

1. Appreciate the discussion today on schema validation and code generation.

It was good to learn more about your guys' plans for X3D JSON Schema, and also to meet you Alexander.  Thanks for your interest!

2. I'll be happy to consider possible future integration and use with X3D Validator and also the Ant-based build scripts for the X3D Examples Archives.

	X3D Validator
	https://savage.nps.edu/X3dValidator

3. There are many validation approaches out there.  Our approach has been to value them all, and try to get them to work together.  Expressive power varies and so each time we find differences, it is instructive and helpful.

	X3D Resources: Quality Assurance (QA)
	http://www.web3d.org/x3d/content/examples/X3dResources.html#QualityAssurance

4. Here is how the Ant build.xml file utilizes the json schema:

http://x3dgraphics.com/examples/X3dForAdvancedModeling/build.xml
================================================================
<!-- https://github.com/fge/json-schema-validator -->
<!-- http://stackoverflow.com/questions/22867521/how-to-run-json-schema-validator-from-the-command-line -->
<!-- fix double-hyphen switch when running on command line: -->
<!-- java -jar lib/json-schema-validator-2.2.6-lib.jar - -help -->
<!-- java -jar lib/json-schema-validator-2.2.6-lib.jar - -syntax ../../specifications/x3d-3.3-JSONSchema.json -->
<!-- java -jar lib/json-schema-validator-2.2.6-lib.jar ../../specifications/x3d-3.3-JSONSchema.json test/HelloWorld.json -->
<property name="json-schema-validator.jar"     value="lib/json-schema-validator-2.2.6-lib.jar"/>

<target name="processScripts.jslint" description="run jslint on .js script source files">
	<!-- https://code.google.com/p/jslint4java -->
	<!-- http://docs.jslint4java.googlecode.com/git/2.0.5 -->
	<echo message="stylesheet compiled=${compiled}"/>
	<echo>*.js script error checking with jslint using jslint4java, https://code.google.com/p/jslint4java</echo>

	<java classname="com.googlecode.jslint4java.cli.Main" classpath="${jslint.jar}" fork="${fork}">
		<arg value="--version"/>
		<arg value="--help"/>
	</java>

[...]
<java classname="com.googlecode.jslint4java.cli.Main" classpath="${jslint.jar}" fork="${fork}">
	<!-- command line interface: http://docs.jslint4java.googlecode.com/git/2.0.5/cli.html -->
	<arg value="--eqeq"/>
	<arg value="--maxerr"/><arg value="1000"/>
	<arg value="--plusplus"/>
	<arg value="--sloppy"/> <!-- the 'use strict'; pragma is optional -->
	<arg value="--todo"/>
<!-- <arg value="- -undef"/> not yet supported by jslint4java -->
	<arg value="--vars"/>
	<arg value="--white"/>
	<!-- build and pass a list of predefined global variables from .x3d Script field definitions, if found -->
	<arg value="--predef"/>
	<arg value="${sceneScriptFieldGlobals}"/> <!-- defined in sceneScriptFieldGlobals.properties -->
	<arg value="@{file.path.name}"/>
</java>
================================================================

5. Looking forward to continuing progress, thanks!

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