IntelliJ IDEA plugin for an enhanced coding experience on JCV based projects.
This plugin brings the JCV language support injected in JSON language.
Any identified validator will get a quick documentation and even external links to official documentation for official JCV validators:
As you start typing in the JCV template pattern, a list of available validators will be suggested to you:
You will also get parameter values completion if available, for example with the date_time_format from JCV:
JCV is a library allowing you to compare JSON contents with embedded validation. It comes with plenty of pre-defined validators (listed here) designed to cover the most common needs when validating data with non-predictable values.
JCV-DB reuses these validators and also defines a list of its own (listed here) that are specific to a database-oriented usage.
This plugin offers autocompletion on all the validators of these two projects to date if detected in your project external libraries.
Using an official validator without the actual library linked to the current project module will give you a warning and can guide you to the Maven Central library page to get it:
You can define your own custom validator definitions by adding a .jcvdefinitions.json
file in the project root directory or just let the plugin do it for you:
Here is an example definition you can customize:
ROOT_PROJECT_DIRECTORY/.jcvdefinitions.json
{
"validators" : [ {
"id" : "my_custom_validator",
"parameters" : [ {
"description" : "My first param",
"required" : true,
"suggested_values" : [ "Value 1", "Value 2" ]
}, {
"description" : "Another parameter",
"required" : false,
"suggested_values" : [ "Another value to suggest" ]
} ]
} ]
}
The plugin can find raw JSON value that can be replaced by official matching validators.
Note that it also supports multi-caret replacement with matching validators for all JSON values find at each caret.
You can configure the color scheme settings:
Here are the available inspections that you can customize:
You can find the JCV replacement suggestions on JSON values in the intentions: