Permalink
Browse files

feat #342 $description no longer mandatory in bean definitions

  • Loading branch information...
1 parent cb9d29b commit 6307e6c4b8cee9a7a81802b758fd1c39178cd950 @flongo committed Jan 23, 2013
Showing with 1 addition and 14 deletions.
  1. +1 −2 src/aria/core/BaseTypes.js
  2. +0 −5 src/aria/core/JsonValidator.js
  3. +0 −7 test/aria/core/JsonValidatorTest.js
View
3 src/aria/core/BaseTypes.js
@@ -35,8 +35,7 @@ Aria.beanDefinitions({
},
'$description' : {
$type : "json:String",
- $description : "A literal description of the package and its purpose.",
- $mandatory : true
+ $description : "A literal description of the package and its purpose."
},
'$dependencies' : {
View
5 src/aria/core/JsonValidator.js
@@ -175,7 +175,6 @@
INVALID_DEFAULTVALUE : "Default value %1 in %2 is invalid: %3",
BEANCHECK_FAILED : "Checking bean definition %1 with beans schema failed: %2",
MISSING_ENUMVALUES : "$enumValues must be defined and non-empty in the Enum definition in %1",
- MISSING_DESCRIPTION : "Missing $description in %1",
INVALID_NAME : "Invalid name for a bean: %1 in %2",
NUMBER_INVALID_INHERITANCE : "Invalid inheritance: %1 in %2 should respect its parent range",
NUMBER_INVALID_RANGE : "Invalid range in %1: %2-%3",
@@ -387,10 +386,6 @@
if (!beanDef.$description && !typeRef[this._MD_BUILTIN]) {
beanDef.$description = typeRef.$description;
}
- if (!beanDef.$description && beanDef.$description !== "") {
- this._logError(this.MISSING_DESCRIPTION, beanDef[this._MD_TYPENAME]);
- return this._typeError;
- }
var hasNoDefault = !("$default" in beanDef), hasNoMandatory = !("$mandatory" in beanDef);
View
7 test/aria/core/JsonValidatorTest.js
@@ -243,13 +243,6 @@ Aria.classDefinition({
}
}
}, {
- errorMsgs : [jv.MISSING_DESCRIPTION],
- beans : {
- TestBean : {
- $type : "json:String"
- }
- }
- }, {
errorMsgs : [jv.MISSING_ENUMVALUES],
beans : {
TestBean : {

0 comments on commit 6307e6c

Please sign in to comment.