diff --git a/lib/services/schema-normalizer.service.spec.ts b/lib/services/schema-normalizer.service.spec.ts index 57c64a0e..a67666e4 100644 --- a/lib/services/schema-normalizer.service.spec.ts +++ b/lib/services/schema-normalizer.service.spec.ts @@ -152,7 +152,7 @@ describe('Spec Helper', () => { }); it('should remove $allOf field', () => { - expect(joined.allOf).toBeNull(); + expect(joined.allOf).toBeUndefined(); }); it('should set type object', () => { @@ -178,7 +178,7 @@ describe('Spec Helper', () => { }); it('should remove $allOf field', () => { - expect(joined.allOf).toBeNull(); + expect(joined.allOf).toBeUndefined(); }); it('should set type object', () => { @@ -204,7 +204,7 @@ describe('Spec Helper', () => { }); it('should remove $allOf field', () => { - expect(joined.allOf).toBeNull(); + expect(joined.allOf).toBeUndefined(); }); it('should set type object', () => { diff --git a/lib/services/schema-normalizer.service.ts b/lib/services/schema-normalizer.service.ts index f599a73a..f60de630 100644 --- a/lib/services/schema-normalizer.service.ts +++ b/lib/services/schema-normalizer.service.ts @@ -116,7 +116,7 @@ export class AllOfMerger { subSchema._pointer = tmpPtr; } if (!hadDiscriminator) into.discriminator = null; - into.allOf = null; + delete into.allOf; } private static mergeObject(into, subSchema, allOfNumber) { diff --git a/package.json b/package.json index 2ceaf9e8..905baaf9 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "json-schema-ref-parser": "^3.3.1", "lunr": "^1.0.0", "mark.js": "^8.11.1", - "openapi-sampler": "^0.4.3", + "openapi-sampler": "1.0.0-beta.8", "perfect-scrollbar": "^0.8.1", "prismjs": "^1.8.1", "remarkable": "1.7.1", diff --git a/yarn.lock b/yarn.lock index 41f9cab7..636cf70a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4676,9 +4676,11 @@ ono@^4.0.2: dependencies: format-util "^1.0.3" -openapi-sampler@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/openapi-sampler/-/openapi-sampler-0.4.3.tgz#de3aa522f45744c8349f598d4d9b6f35caaf25b2" +openapi-sampler@1.0.0-beta.8: + version "1.0.0-beta.8" + resolved "https://registry.yarnpkg.com/openapi-sampler/-/openapi-sampler-1.0.0-beta.8.tgz#bf43ff47737fc4e1f988d0e2082d49788f41dead" + dependencies: + json-pointer "^0.6.0" opener@~1.4.0: version "1.4.3"