Like the mainTemplate.json, the createUiDefinition.json file can also be tested with the scripts located at https://github.com/Azure/azure-quickstart-templates/tree/master/test/template-validation-tests.
To test your UI definition against those scripts, simply run the following command:
npm --folder=sample-template run createUi
With the folder parameter set to the location of your files. After running this command, you should get the following output:
Output of script based test for createUiDefinition.json