Page 1 of 1

Default JSON Schema template

Posted: Fri Oct 11, 2024 2:05 am
by scottbdr
Hi, I wasn't able to figure out how I can get a new Json Schema file to use v2020-12 rather than draft-07. Is there a template somewhere I can modify for this? Would also be nice to be able to modify for project preferences too.

Thanks, Scott

Re: Default JSON Schema template

Posted: Fri Oct 11, 2024 9:19 am
by florin_nica
Hi, Scott

To use Draft 2020-12 validation in a JSON Schema file, simply update the schema declaration on the first line to

Code: Select all

"$schema": "http://json-schema.org/draft/2020-12/schema"
When creating a new JSON Schema file, you can apply a custom template by selecting "Customize" in the New File dialog, and then choosing the Draft 2020-12 option from the dropdown menu.

You might also want to create a custom validation scenario and choose JSON Schema Validator as the validation engine. For more information, refer to this link:: https://www.oxygenxml.com/doc/versions/ ... nario.html

Regards,
Florin

Re: Default JSON Schema template

Posted: Sat Oct 12, 2024 12:28 am
by scottbdr
Thank you Florin, this gets me what I need. Still wondering about project specific templating - perhaps that's more of a feature request.

Re: Default JSON Schema template

Posted: Mon Oct 14, 2024 11:51 am
by tavy
Hi Scott,

You can create your own templates and store them either in the existing templates folder within the Oxygen installation directory or in a custom directory. If you choose a custom directory, you need to add it to the list of template directories in the Document Templates preferences page.

For more detailed steps on creating and customizing document templates, you can refer to the following topics:
Creating New Document Templates
Document Templates Preferences

Best Regards,
Octavian

Re: Default JSON Schema template

Posted: Mon Oct 14, 2024 6:04 pm
by scottbdr
Perfect. Thank you!