FIx tsc error.

Signed-off-by: Aramis Sennyey <sennyeya@amazon.com>
This commit is contained in:
Aramis Sennyey
2023-03-07 17:12:11 -05:00
committed by Fredrik Adelöw
parent caddd25a8d
commit 7e8f8c4d16
+2 -2
View File
@@ -23,7 +23,7 @@ import chalk from 'chalk';
import { relative as relativePath } from 'path';
import { PackageGraph } from '../../lib/monorepo';
import { cloneDeep } from 'lodash';
import SwaggerParser from '@apidevtools/swagger-parser';
import { validate as validateSpec } from '@apidevtools/swagger-parser';
async function verify(directoryPath: string) {
const openapiPath = join(directoryPath, 'openapi.yaml');
@@ -31,7 +31,7 @@ async function verify(directoryPath: string) {
return;
}
const yaml = YAML.load(await fs.readFile(openapiPath, 'utf8'));
await SwaggerParser.validate(cloneDeep(yaml));
await validateSpec(cloneDeep(yaml) as any);
const schemaPath = join(directoryPath, 'schema/openapi.ts');
if (!(await fs.pathExists(schemaPath))) {