Create vers-type-definition.schema-0.1.json - #78
Conversation
First draft of a VERS type definition schema - Based on PURL type definition schema - Using JSON schema 2020-12 as requested by tschmidtb51 - Encountered error from https://www.jsonschemavalidator.net/ on line 113: After parsing a value an unexpected character was encountered: :. Signed-off-by: Michael Herzog <mjherzog@aboutcode.org>
Updates to pass schema validation Used prefixItems which is new with JSON Schema Draft 2020-12 Still getting an error on last line: " Additional text encountered after finished reading JSON content: }." but I cannot figure this one out.
|
@pombredanne I expect that this has something to do with pairing braces, but I cannot figure it out. |
|
@mjherzog I think there's an extra closing brace |
|
@johnmhoran I expect that it is a problem with the braces, but when I remove the last closing brace I get different errors |
|
@mjherzog Can you paste the error text here? |
|
I appreciate your help. The best way to reproduce is to open a browser tab for: https://www.jsonschemavalidator.net/ |
|
@mjherzog We've been using |
|
We had a specific request for this from the CSAF team so we should use the current version for a new standard imho. I used a 2020-12 feature for prefixItems. |
|
@mjherzog Sticking with 2020-12, I saw that the error pointed to the "examples" object (line 116), that "examples" is one of the items listed under "required" (lines 28-35), and that each of the items under "required" -- except "examples" -- is listed (starting at line 36) under "properties". I moved "examples" to the "properties" object immediately following "description" (line 69), joining the other items listed under "required", and the modified JSON passed the 2020-12 validation. |
|
@johnmhoran Hallelujah. Please update the PR to make that change if you can. |
If we move the "examples" object - from its current location - to the "properties" object at the top of the file (immediately after the "description" object, just as they are listed above there in the "required" object) the updated .json passes the 2020-12 validator check.
|
@mjherzog I had thought I could not update someone else's PR, based on looking into the question a year or two back, but I do see an "edit" button and will click it and see what I can do. . . . Excellent -- I was able to replace with an updated and reformatted file and it still passes the 2020-12 check. |
|
Outstanding - thank you! |
|
@pombredanne Please review the schema for accuracy. |
Changed $schema to https instead of http
First draft of a VERS type definition schema