File tree 3 files changed +22
-3
lines changed
packages/openapi-parser/src 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @gitbook/openapi-parser ' : patch
3
+ ---
4
+
5
+ Expose helper ` shouldIgnoreEntity `
Original file line number Diff line number Diff line change
1
+ import type { OpenAPIV3 } from '@scalar/openapi-types' ;
2
+
3
+ /**
4
+ * Check if an entity should be ignored
5
+ */
6
+ export function shouldIgnoreEntity (
7
+ data :
8
+ | undefined
9
+ | Pick < OpenAPIV3 . TagObject , 'x-internal' | 'x-gitbook-ignore' >
10
+ | Pick < OpenAPIV3 . OperationObject , 'x-internal' | 'x-gitbook-ignore' >
11
+ ) {
12
+ return data ?. [ 'x-internal' ] === true || data ?. [ 'x-gitbook-ignore' ] === true ;
13
+ }
Original file line number Diff line number Diff line change 1
1
export { parseOpenAPI } from './parse' ;
2
2
3
+ export { dereference } from '@scalar/openapi-parser' ;
4
+ export type { AnyObject } from '@scalar/openapi-parser' ;
3
5
export type * from '@scalar/openapi-types' ;
4
- export type * from './types' ;
5
6
export * from './error' ;
7
+ export * from './helpers/shouldIgnoreEntity' ;
6
8
export * from './traverse' ;
7
- export { dereference } from '@scalar/openapi-parser' ;
8
- export type { AnyObject } from '@scalar/openapi-parser' ;
9
+ export type * from './types' ;
You can’t perform that action at this time.
0 commit comments