From 2aa6d77824c26a8594af19f7de94853223031287 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Thu, 13 Feb 2020 12:12:17 -0800 Subject: [PATCH] fix: allowing schema refs to not start with `#/definitions` --- packages/core/src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/utils.js b/packages/core/src/utils.js index 6780c8a717..16639adc6d 100644 --- a/packages/core/src/utils.js +++ b/packages/core/src/utils.js @@ -539,7 +539,7 @@ export function optionsList(schema) { function findSchemaDefinition($ref, definitions = {}) { // Extract and use the referenced definition if we have it. - const match = /^#\/definitions\/(.*)$/.exec($ref); + const match = /^#(?:\/definitions)?\/(.*)$/.exec($ref); if (match && match[1]) { const parts = match[1].split("/"); let current = definitions;