Skip to content

Commit 503fbb6

Browse files
committed
feat(json-schema) : re-implement to tighten validation and add support for decorators
Signed-off-by: Dan Selman <[email protected]>
1 parent d3690ee commit 503fbb6

File tree

9 files changed

+2363
-2371
lines changed

9 files changed

+2363
-2371
lines changed

package-lock.json

Lines changed: 1281 additions & 1482 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"private": true,
33
"devDependencies": {
44
"colors": "^1.4.0",
5-
"eslint": "6.0.1",
65
"coveralls": "3.0.4",
6+
"eslint": "6.0.1",
77
"istanbul-combine": "0.3.0",
88
"istanbul-merge": "1.1.1",
99
"jsdoc": "3.6.3",
10-
"lerna": "3.15.0",
10+
"lerna": "^3.22.1",
1111
"license-check-and-add": "2.3.6",
1212
"moment-mini": "2.22.1",
1313
"nyc": "14.1.1",
@@ -94,4 +94,4 @@
9494
}
9595
}
9696
}
97-
}
97+
}

packages/concerto-core/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ module.exports.SecurityException = require('./lib/securityexception');
5050
module.exports.Serializer = require('./lib/serializer');
5151
module.exports.TransactionDeclaration = require('./lib/introspect/transactiondeclaration');
5252
module.exports.Typed = require('./lib/model/typed');
53+
module.exports.TypedStack = require('./lib/serializer/typedstack');
5354
module.exports.ModelUtil = require('./lib/modelutil');
5455
module.exports.version = require('./package.json');

packages/concerto-core/lib/introspect/numbervalidator.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ class NumberValidator extends Validator{
5757
}
5858
}
5959

60+
/**
61+
* Returns the lower bound for this validator, or null if not specified
62+
* @returns {number} the lower bound or null
63+
*/
64+
getLowerBound() {
65+
return this.lowerBound;
66+
}
67+
/**
68+
* Returns the upper bound for this validator, or null if not specified
69+
* @returns {number} the upper bound or null
70+
*/
71+
getUpperBound() {
72+
return this.upperBound;
73+
}
74+
6075
/**
6176
* Validate the property
6277
* @param {string} identifier the identifier of the instance being validated

packages/concerto-core/lib/introspect/stringvalidator.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ class StringValidator extends Validator{
5757
}
5858
}
5959
}
60+
61+
/**
62+
* Returns the RegExp object associated with the string validator
63+
* @returns {RegExp} the RegExp object
64+
*/
65+
getRegex() {
66+
return this.regex;
67+
}
6068
}
6169

6270
module.exports = StringValidator;

0 commit comments

Comments
 (0)