Skip to content

Commit

Permalink
chore(openapi): prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tullis committed Sep 26, 2023
1 parent ca069d7 commit 1490d18
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/lib/prepareOas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default async function prepareOas(
title?: string;
} = {
convertToLatest: false,
}
},
) {
let specPath = path;

Expand Down Expand Up @@ -96,7 +96,7 @@ export default async function prepareOas(
file =>
file.toLowerCase().endsWith('.json') ||
file.toLowerCase().endsWith('.yaml') ||
file.toLowerCase().endsWith('.yml')
file.toLowerCase().endsWith('.yml'),
);

debug(`number of JSON or YAML files found: ${jsonAndYamlFiles.length}`);
Expand All @@ -119,7 +119,7 @@ export default async function prepareOas(
debug(`error extracting API definition specification version for ${file}: ${e.message}`);
return null;
});
})
}),
)
).filter(truthy);

Expand All @@ -128,7 +128,7 @@ export default async function prepareOas(
if (!possibleSpecFiles.length) {
fileFindingSpinner.fail();
throw new Error(
`We couldn't find an OpenAPI or Swagger definition.\n\nPlease specify the path to your definition with \`rdme ${command} ./path/to/api/definition\`.`
`We couldn't find an OpenAPI or Swagger definition.\n\nPlease specify the path to your definition with \`rdme ${command} ./path/to/api/definition\`.`,
);
}

Expand Down Expand Up @@ -216,22 +216,22 @@ export default async function prepareOas(
switch (command) {
case 'openapi':
warn(
'You are attempting to upload a Postman collection. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference'
'You are attempting to upload a Postman collection. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference',
);
break;
case 'openapi:validate':
warn(
'You are attempting to validate a Postman collection. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference'
'You are attempting to validate a Postman collection. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference',
);
break;
case 'openapi:inspect':
warn(
'You are inspecting a Postman collection. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference'
'You are inspecting a Postman collection. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference',
);
break;
case 'openapi:convert':
warn(
'You are attempting to convert a Postman collection to an OpenAPI file. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference'
'You are attempting to convert a Postman collection to an OpenAPI file. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference',
);
break;
default:
Expand Down

0 comments on commit 1490d18

Please sign in to comment.