Skip to content

Commit

Permalink
revert: broken oas-normalize state
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Sep 12, 2023
1 parent 7ab41bd commit ca96b4f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/prepareOas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { debug, info, oraOptions } from './logger.js';
import promptTerminal from './promptWrapper.js';
import readdirRecursive from './readdirRecursive.js';

export type SpecFileType = OASNormalize.default['type'];
export type SpecFileType = OASNormalize['type'];

Check failure on line 12 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (14)

Cannot use namespace 'OASNormalize' as a type.

Check failure on line 12 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (16)

Cannot use namespace 'OASNormalize' as a type.

Check failure on line 12 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (18)

Cannot use namespace 'OASNormalize' as a type.

Check failure on line 12 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (20)

Cannot use namespace 'OASNormalize' as a type.

interface FoundSpecFile {
/** path to the spec file */
Expand Down Expand Up @@ -96,7 +96,6 @@ export default async function prepareOas(
await Promise.all(
jsonAndYamlFiles.map(file => {
debug(`attempting to oas-normalize ${file}`);
// @ts-expect-error yikes why
const oas = new OASNormalize(file, { enablePaths: true });

Check failure on line 99 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (14)

This expression is not constructable.

Check failure on line 99 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (16)

This expression is not constructable.

Check failure on line 99 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (18)

This expression is not constructable.

Check failure on line 99 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (20)

This expression is not constructable.
return oas
.version()
Expand Down Expand Up @@ -155,7 +154,6 @@ export default async function prepareOas(
const spinner = ora({ text: `Validating the API definition located at ${specPath}...`, ...oraOptions() }).start();

debug(`about to normalize spec located at ${specPath}`);
// @ts-expect-error yikes why
const oas = new OASNormalize(specPath, { colorizeErrors: true, enablePaths: true });

Check failure on line 157 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (14)

This expression is not constructable.

Check failure on line 157 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (16)

This expression is not constructable.

Check failure on line 157 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (18)

This expression is not constructable.

Check failure on line 157 in src/lib/prepareOas.ts

View workflow job for this annotation

GitHub Actions / Test Suite (20)

This expression is not constructable.
debug('spec normalized');

Expand Down

0 comments on commit ca96b4f

Please sign in to comment.