[x3d-public] Potential changes to x3D JSON validation, schema generation changes for support of NavigationInfo.type
John Carlson
yottzumm at gmail.com
Sat Jan 22 00:34:35 PST 2022
Patch to schema to support NavigationInfo.type JSON type change from array
to string. I'd like to check for NavigationInfo as a parent node to the
type. Contributions welcome!
John
$ git diff etgenerateJSONschema2020-12.py
diff --git a/src/main/python/etgenerateJSONschema2020-12.py
b/src/main/python/etgenerateJSONschema2020-12.py
index 5db1236db..2cc4204c8 100644
--- a/src/main/python/etgenerateJSONschema2020-12.py
+++ b/src/main/python/etgenerateJSONschema2020-12.py
@@ -218,6 +218,8 @@ class ClassPrinter:
str += 'object"\n'
elif field.get("type") == "SFString":
str += 'string"\n'
+ elif field.get("type") == "MFString" and field.get("name")
== "type":
+ str += 'string"\n'
else:
str += 'array",\n'
if field.get("type") == "SFBool":
@@ -234,6 +236,8 @@ class ClassPrinter:
pass
elif field.get("type") == "SFString":
pass
+ elif field.get("type") == "MFString" and field.get("name") ==
"type":
+ pass
else:
str += '\t\t\t\t\t\t"$comment":"'+field.get("type")+'
'+field.get("accessType")+'",\n'
str += '\t\t\t\t\t\t"type":"'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220122/bd6e6ce5/attachment.html>
More information about the x3d-public
mailing list