npm run prettier

This commit is contained in:
Zachary Whaley 2021-07-20 12:17:09 -05:00
parent 196a2a0912
commit 58b549763c
3 changed files with 9 additions and 6 deletions

View File

@ -28,7 +28,10 @@ export class SpecStore {
this.externalDocs = this.parser.spec.externalDocs;
this.contentItems = MenuBuilder.buildStructure(this.parser, this.options);
this.securitySchemes = new SecuritySchemesModel(this.parser);
const webhookPath: Referenced<OpenAPIPath> = {...this.parser?.spec?.['x-webhooks'], ...this.parser?.spec.webhooks};
const webhookPath: Referenced<OpenAPIPath> = {
...this.parser?.spec?.['x-webhooks'],
...this.parser?.spec.webhooks,
};
this.webhooks = new WebhookModel(this.parser, options, webhookPath);
}
}

View File

@ -54,8 +54,8 @@ describe('Models', () => {
license: {
name: 'MIT',
identifier: 'MIT',
url: 'https://opensource.org/licenses/MIT'
}
url: 'https://opensource.org/licenses/MIT',
},
},
} as any;
@ -83,7 +83,7 @@ describe('Models', () => {
},
} as any;
const opts = new RedocNormalizedOptions({downloadFileName: 'openapi.yaml'});
const opts = new RedocNormalizedOptions({ downloadFileName: 'openapi.yaml' });
const info = new ApiInfoModel(parser, opts);
expect(info.downloadFileName).toEqual('openapi.yaml');
});
@ -96,7 +96,7 @@ describe('Models', () => {
},
} as any;
const opts = new RedocNormalizedOptions({downloadFileName: 'nope.txt'});
const opts = new RedocNormalizedOptions({ downloadFileName: 'nope.txt' });
const info = new ApiInfoModel(parser, opts);
expect(info.downloadFileName).toEqual('swagger.json');
});

View File

@ -1,5 +1,5 @@
import * as path from 'path';
import * as yaml from 'js-yaml'
import * as yaml from 'js-yaml';
import { OpenAPIContact, OpenAPIInfo, OpenAPILicense } from '../../types';
import { IS_BROWSER } from '../../utils/';
import { OpenAPIParser } from '../OpenAPIParser';