-
Notifications
You must be signed in to change notification settings - Fork 14
/
toolbox.ts
44 lines (39 loc) · 1.14 KB
/
toolbox.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import {
isElement,
isStringElement,
isArrayElement,
isObjectElement,
isMemberElement,
createNamespace,
includesClasses,
hasElementSourceMap,
} from '@swagger-api/apidom-core';
import { isServersElement } from '@swagger-api/apidom-ns-openapi-3-0';
import * as openApi3_1Predicates from '../predicates';
import openApi3_1Namespace from '../namespace';
export type Predicates = typeof openApi3_1Predicates & {
isElement: typeof isElement;
isStringElement: typeof isStringElement;
isArrayElement: typeof isArrayElement;
isObjectElement: typeof isObjectElement;
isMemberElement: typeof isMemberElement;
isServersElement: typeof isServersElement;
includesClasses: typeof includesClasses;
hasElementSourceMap: typeof hasElementSourceMap;
};
const createToolbox = () => {
const namespace = createNamespace(openApi3_1Namespace);
const predicates: Predicates = {
...openApi3_1Predicates,
isElement,
isStringElement,
isArrayElement,
isObjectElement,
isMemberElement,
isServersElement,
includesClasses,
hasElementSourceMap,
};
return { predicates, namespace };
};
export default createToolbox;