From c777a9cda52bd4506d0cb1e2f37011c2971b9e70 Mon Sep 17 00:00:00 2001
From: Jakob Olsson <Jakob Olsson>
Date: Fri, 13 Dec 2019 09:47:18 +0100
Subject: [PATCH] schema: process nested oneOf

---
 lib/schema.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/schema.js b/lib/schema.js
index 0a72848..2869a94 100644
--- a/lib/schema.js
+++ b/lib/schema.js
@@ -126,7 +126,8 @@ const resolve$ref = Promise.method((val, base$id) => {
 });
 const processFurther = Promise.method((val, key, $id) => {
   const base$id = $id;
-  if (val.$ref) {
+  if (val.oneOf) return processISchema(val, base$id);
+  else if (val.$ref) {
     return resolve$ref(val, base$id);
   } else {
     if (val.items && val.type === 'array') {
-- 
GitLab