Definition Wide Policy: globalSettings
One definition per workspace may carry a globalSettings block instead of a configurationFileMode.
It constrains what every other definition in the workspace.
It also restricts or allows configuration features in the workspace.
{
$definitionSpecVersion: "1.0",
definitionName: "ProjectPolicy",
definitionVersion: "1.0",
title: "Workspace policy",
description: "Restricts the configuration file modes and file types the definitions of this workspace may use.",
globalSettings: {
supportedConfigurationFileModes: [
"SingleFile",
"MultipleFilesEntitiesMergeable",
"MultipleFilesEntitiesMergeableWithPriority"
],
supportedConfigurationFileTypes: [
"UserConfig",
"UserConfigPriorityHigh"
],
refs: {
// Both reference forms stay allowed, listing only one would reject the other.
allowedRefTypes: [
"AbsPath",
"Id"
],
unresolvedTargetSeverity: "Error"
}
}
}
-
supportedConfigurationFileModesrestricts which modes other definitions in the workspace may use. -
supportedConfigurationFileTypesrestricts the allowed$fileTypevalues. It requiresMultipleFilesEntitiesMergeableWithPriorityamong the supported modes and must always includeUserConfig. -
refs.allowedRefTypesrestricts the reference forms configurations may write,AbsPath("/Path/Entity") andId("id:Something"). -
refs.unresolvedTargetSeverityis the severity of a reference to a missing target,Error(the default),Warning, orInfo. It does not affect a fragment$path, which stays an error when it resolves to nothing. -
numberUnitInStrings: falseforbids unit strings such as"2 MHz"and decimal numbers in int strings such as"2.0". -
floatStrings: falseany string on a float. It requiresnumberUnitInStrings: false, because a unit string on a float is a float string.-
Switch them off when the configuration files are read by loaders that parse no units, such as generated code.
-
Use it when you own an integration platform and want to constrain what the definitions of contributing components may ask of configuration authors. A definition delivered into such a workspace can become invalid without being changed, so a policy is a decision for the whole integration, not for one component.