-
Feature Request
-
Resolution: Done
-
Major
-
3.0.0.Alpha1
-
None
ModeShape 3 configuration files are JSON files, and ModeShape defines a JSON Schema for them. The configuration files need to allow system properties to be specified in the same format as in 2.x (see MODE-1098), namely using "${propertyName}" within a value. Multiple properties can be named within the variable, as can a default. Here's an example of a variable with two property names and a default:
${propertyName1,propertyName2:defaultValue}
Specifically, the grammar for variables is as follows:
variable := '${' variableNames [ ':' defaultValue ] '}' variableNames := variableName [ ',' variableNames ] variableName := /* any characters except ',' and ':' and '}' defaultValue := /* any characters except '}'
Unfortunately, the nature of JSON and JSON Schema make this harder than it appears. JSON allows numbers and boolean values to not be quoted, so using a property in place of such values requires using a string value, and the string value may not be compatible with the allowed JSON Schema type for that field.
- is related to
-
MODE-1098 When reading the configuration file, enable the reader to perform property substitution so that locations can be dynamically set
- Closed