The PSR-4 autoloader requires "AutoloadNamespaces" keys to have a
trailing \ (\\ in JSON), so add a validation check for that.
Unfortunately the validation error isn't great, since it checks to see
if the property matches patternProperties, and when it doesn't, it
claims the property isn't defined since additionalProperties is false.
But it's still better than not failing when they are missing.
Bug: T189136
Change-Id: If01bd06cdd767fb704a8ff85cdf1c143e53fa4ca
},
"AutoloadNamespaces": {
"type": "object",
- "description": "Mapping of PSR-4 compliant namespace to directory for autoloading"
+ "description": "Mapping of PSR-4 compliant namespace to directory for autoloading",
+ "patternProperties": {
+ "^[A-Za-z0-9\\\\]+\\\\$": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
},
"AutoloadClasses": {
"type": "object"
},
"AutoloadNamespaces": {
"type": "object",
- "description": "Mapping of PSR-4 compliant namespace to directory for autoloading"
+ "description": "Mapping of PSR-4 compliant namespace to directory for autoloading",
+ "patternProperties": {
+ "^[A-Za-z0-9\\\\]+\\\\$": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
},
"AutoloadClasses": {
"type": "object"