fix: recursive ref to async sub-schema, closes #612
parent
850d904574
commit
b8d36fc0b0
|
@ -221,7 +221,7 @@ function compile(schema, root, localRefs, baseId) {
|
|||
function resolvedRef(refVal, code) {
|
||||
return typeof refVal == 'object' || typeof refVal == 'boolean'
|
||||
? { code: code, schema: refVal, inline: true }
|
||||
: { code: code, $async: refVal && refVal.$async };
|
||||
: { code: code, $async: refVal && !!refVal.$async };
|
||||
}
|
||||
|
||||
function usePattern(regexStr) {
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
{{?}}
|
||||
{{??}}
|
||||
{{
|
||||
$async = $refVal.$async === true;
|
||||
$async = $refVal.$async === true || (it.async && $refVal.$async !== false);
|
||||
$refCode = $refVal.code;
|
||||
}}
|
||||
{{?}}
|
||||
|
|
|
@ -239,7 +239,7 @@ describe('async schemas, formats and keywords', function() {
|
|||
return recursiveTest(schema);
|
||||
});
|
||||
|
||||
it.skip('should validate recursive ref to async sub-schema, issue #612', function() {
|
||||
it('should validate recursive ref to async sub-schema, issue #612', function() {
|
||||
var schema = {
|
||||
$async: true,
|
||||
type: 'object',
|
||||
|
|
Loading…
Reference in New Issue