Skip to content

Commit 09eedf2

Browse files
committed
Export filterSelectedOpenAPISchemas
1 parent 2ab8348 commit 09eedf2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/react-openapi/src/schemas/resolveOpenAPISchemas.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function resolveOpenAPISchemas(
2424

2525
const schema = await dereferenceFilesystem(filesystem);
2626

27-
const schemas = getOpenAPIComponents(schema, selectedSchemas);
27+
const schemas = filterSelectedOpenAPISchemas(schema, selectedSchemas);
2828

2929
if (schemas.length === 0) {
3030
return null;
@@ -33,9 +33,9 @@ export async function resolveOpenAPISchemas(
3333
return { schemas };
3434
}
3535
/**
36-
* Get OpenAPI components.schemas that are not ignored.
36+
* Extract selected schemas from the OpenAPI document.
3737
*/
38-
function getOpenAPIComponents(
38+
export function filterSelectedOpenAPISchemas(
3939
schema: OpenAPIV3.Document | OpenAPIV3_1.Document,
4040
selectedSchemas: string[]
4141
): OpenAPISchema[] {

0 commit comments

Comments
 (0)