Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
specPath: string,
apiUrl: string,
auth?: string,
endPointValidator?: EndPointValidator, // simple DI
) {
this.specPath = specPath;
this.apiUrl = apiUrl;
this.auth = auth ? auth : undefined;
if (endPointValidator) {
this.endPointValidator = endPointValidator;
}
this._document = this.loadOpenApiSpec();
this._oa3Validator = new OpenApiValidator(this.document, {
ajvOptions: { allErrors: true, verbose: true },
});
}