[x3d-public] patch to JSON schemas

John Carlson yottzumm at gmail.com
Sun May 26 23:09:16 PDT 2019


Yeah, we’ll have to otherwise choose something besides the contents of acceptableNodeTypes to make it acceptable to definitions in JSON schema.   We probably want to make it at least somewhat understandable. Suggestions are welcome.  I believe Roy did a good job selecting names.  Perhaps we could create a mapping from definitions to Roy’s strings?

John

Sent from Mail for Windows 10

From: Brutzman, Donald (Don) (CIV)
Sent: Sunday, May 26, 2019 5:24 PM
To: John Carlson
Cc: X3D Graphics public mailing list
Subject: Re: [x3d-public] patch to JSON schemas

perhaps this misunderstanding is that acceptableNodeTypes is not a URL or a URI, rather a list of nodes that are acceptable substitutes.  so the field has type string.

On 5/26/2019 11:19 AM, John Carlson wrote:
> See link for discussion and link to URI RFC.  I’m fairly sure | is not a valid URI character.   That is, you can’t issue a POSIX command with pipes in a URI, even though some people would like to.  I am pretty sure I’ve tried that and failed 😊
> 
> https://github.com/everit-org/json-schema/issues/258
> 
> I hope this satisfies you that I’ve done the right thing.  Obviously, we will have to verify through the whole system.
> 
> In other words, JSON schema says uri or uri-reference, I think.  You can check the hyper or meta schema.   Good luck!
> 
> What would you like to use instead that’s a valid URI character?
> 
> I have generated JSON from fuzz.js and pass the result of fuzz.js through jsonlint.  That’s the only testing I’ve done.
> 
> Wow, I actually sorted this in advance, just had to find the GitHub issue 😊
> 
> Now I need to tell Ajv that | is not acceptable in a URL.
> 
> Thanks,
> 
> John
> 
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
> *From: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu>
> *Sent: *Sunday, May 26, 2019 2:23 AM
> *To: *John Carlson <mailto:yottzumm at gmail.com>
> *Cc: *X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
> *Subject: *Re: [x3d-public] patch to JSON schemas
> 
> understood but the right question is what does JSON schema say (if anything).
> 
> On 5/24/2019 8:00 AM, John Carlson wrote:
> 
>  > Everit would not accept |, so I converted it.  I suggest + if that’s acceptable to the validators/schema. Also – would be acceptable to me
> 
>  >
> 
>  > John
> 
>  >
> 
>  > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
>  >
> 
>  > *From: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu>
> 
>  > *Sent: *Friday, May 24, 2019 9:03 AM
> 
>  > *To: *John Carlson <mailto:yottzumm at gmail.com>
> 
>  > *Cc: *X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
> 
>  > *Subject: *Re: [x3d-public] patch to JSON schemas
> 
>  >
> 
>  > Hi John.  Thanks for keeping things tuned up as best we can while we await JSON Schema finalization.
> 
>  >
> 
>  > ===================================
> 
>  >
> 
>  > http://json-schema.org
> 
>  >
> 
>  > "The current version is draft-07!"
> 
>  >
> 
>  > "Update as of 31 March 2019.  You may be wondering what in the world is going on with this draft? The short version is: we are entering the home stretch. There are some ideas for simplifying $id that we are considering, and then there will be a final review period for feedback on overall flow and clarity."
> 
>  >
> 
>  > ===================================
> 
>  >
> 
>  > and
> 
>  >
> 
>  > https://github.com/json-schema-org/json-schema-spec/milestone/6
> 
>  >
> 
>  > "draft-08, Past due by 4 months, 93% complete.  This theme of draft-08 is re-use and modularity."
> 
>  >
> 
>  > ===================================
> 
>  >
> 
>  > The patch you applied using %7C seems less readable and harder to maintain than the existing entries.  As an example, I assume that you are modifying constructs such as
> 
>  >
> 
>  > XML Schema
> 
>  >
> 
>  >                  <xs:element name="skin" type="MFNode" fixed="inputOutputField" default="Group|Transform|Shape|IndexedFaceSet"/>
> 
>  >
> 
>  > X3DUOM
> 
>  >
> 
>  >                  <field type="MFNode"
> 
>  >
> 
>  >                      accessType="inputOutput"
> 
>  >
> 
>  >                      name="skin"
> 
>  >
> 
>  >                      acceptableNodeTypes="Group|Transform|Shape|IndexedFaceSet"/>
> 
>  >
> 
>  > to produce an excerpt like
> 
>  >
> 
>  > [line 27420]
> 
>  >
> 
>  >                  "-Group%7CTransform%7CShape%7CIndexedFaceSetMFNode": {
> 
>  >
> 
>  > [lines 9130-9132]
> 
>  >
> 
>  >                  "-skin": {
> 
>  >
> 
>  >                 "$ref": "#/definitions/-Group%7CTransform%7CShape%7CIndexedFaceSetMFNode"
> 
>  >
> 
>  >               },
> 
>  >
> 
>  > Issues:
> 
>  >
> 
>  > a. what does JSON Schema currently suggest for such constructs?
> 
>  >
> 
>  > b. is the original | character triggering a problem or unacceptable for some reason?
> 
>  >
> 
>  > c. is there any way to validate these schemas yet?
> 
>  >
> 
>  > d. Why is MFNode tacked on the end?
> 
>  >
> 
>  > e. Are you turning acceptableNodeTypes value into a JSON label?  If so, perhaps a hyphen is better.
> 
>  >
> 
>  > f. what does fuzz.js do?
> 
>  >
> 
>  > Suggest we plan to give a full scrub when json-schema draft-08 is released, that will also let us provide feedback to them.
> 
>  >
> 
>  > On 5/23/2019 4:51 AM, John Carlson wrote:
> 
>  >
> 
>  >  > A patch was made to JSON schema generation to replace | with %7C in more places.
> 
>  >
> 
>  >  >
> 
>  >
> 
>  >  > All generated JSON schemas were affected
> 
>  >
> 
>  >  >
> 
>  >
> 
>  >  > This fixed was verified with the fuzz.js JSON schema driven examples.
> 
>  >
> 
>  >  >
> 
>  >
> 
>  >  > The whole scenario means we need a test plan.
> 
>  >
> 
>  >  >
> 
>  >
> 
>  >  > New schemas are here:
> 
>  >
> 
>  >  >
> 
>  >
> 
>  >  > https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/schema
> 
>  >
> 
>  >  >
> 
>  >
> 
>  >  > John
> 
>  >
> 
>  > 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
> 
>  >
> 
> 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
> 


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190527/022c0e05/attachment-0001.html>


More information about the x3d-public mailing list