placecode validate
Validate the placecode.json file
The placecode validate
command is a powerful utility that enables you to validate the placecode.json
file within your project. This command runs a series of validation functions to ensure that your dynamic template's configuration adheres to the required standards.
The following validation functions are performed when you execute placecode validate
:
F1: Check Schema of the Feature File The command verifies that the schema of the placecode.json file matches the required structure. It ensures that all the necessary attributes and elements are present and formatted correctly.
F2: Verify Unique and Valid Labels The validation process checks if all feature and category labels in the placecode.json file are unique, not empty, and do not contain any special characters or spaces. Properly formatted labels are essential for accurate template generation.
F3: Ensure Dependency Rules The command enforces dependency rules among features. It verifies that a feature cannot depend on another feature within the same category. While multiple dependencies from different categories are allowed, only one dependency from a specific category is permitted.
F4: Validate Dependency References
During validation, the command ensures that all dependency references specified in depend_features
and depend_categories
exist as valid labels in the feature file. Any missing or incorrect references will be flagged.
F5: Single Feature Per Category The validation process guarantees that only one feature can be enabled per category. This restriction ensures that users select at most one feature from each category during template generation.
F6: Required Category Selection The command verifies that at least one feature is selected from all required categories. Required categories must have a feature enabled to ensure the template is generated correctly.
Using the placecode validate command regularly will help maintain the integrity and consistency of your dynamic template configuration, ensuring a smooth and error-free template generation process.
Usage
placecode validate