[x3d-public] Follow-up. Changes to X3D JSON schema for NavigationInfo.type validation

John Carlson yottzumm at gmail.com
Sat Jan 22 00:30:23 PST 2022


Here are changes to X3D JSON schema to support NavigationInfo.type as a
JSON string and not as a JSON array.

Note that we lose quite a bit of validation power, essentially, the user
can specify *any* string--essentially there is no validation beyond JSON
type.  This is because of the combinatorial aspect that the user can
specify in an MFString--any ordering of the enum values is allowed. But I'm
not really sure if we didn't already support *any* string.  I'm unsure at
this point whether we have a pattern for NavigationInfo.type.  I checked,
and it doesn't look useful.

I'm also wondering why the array of enums in the old schema was nearly
duplicated.

None of this is checked in yet.   It's your opportunity to comment.  I will
follow with changes to the schema generator.

Thanks,

John


diff --git a/src/main/schema/x3d-3.0-JSONSchema.json
b/src/main/schema/x3d-3.0-JSONSchema.json
index 3cfcc8f91..059a81858 100644
--- a/src/main/schema/x3d-3.0-JSONSchema.json
+++ b/src/main/schema/x3d-3.0-JSONSchema.json
@@ -9002,38 +9002,7 @@
             },
             "@type": {
               "$comment": "MFString inputOutput",
-              "type": "array",
-              "prefixItems": [
-                {
-                  "enum": [
-                    "ANY",
-                    "WALK",
-                    "EXAMINE",
-                    "FLY",
-                    "LOOKAT",
-                    "NONE",
-                    "EXPLORE"
-                  ],
-                  "default": "EXAMINE",
-                  "type": "string"
-                },
-                {
-                  "enum": [
-                    "ANY",
-                    "WALK",
-                    "EXAMINE",
-                    "FLY",
-                    "LOOKAT",
-                    "NONE",
-                    "EXPLORE"
-                  ],
-                  "default": "ANY",
-                  "type": "string"
-                }
-              ],
-              "items": {
-                "type": "string"
-              }
+              "type": "string"
             },
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220122/15336ad1/attachment.html>


More information about the x3d-public mailing list