fix: null example not used in schema samples

fixes #415
This commit is contained in:
Roman Hotsiy 2018-02-16 12:30:26 +02:00
parent a7c3d622bb
commit 420c51a4ba
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
4 changed files with 10 additions and 8 deletions

View File

@ -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', () => {

View File

@ -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) {

View File

@ -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",

View File

@ -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"