@mintlify/validation 0.1.494 → 0.1.495
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi/v2/getObjectById.d.ts +6 -0
- package/dist/openapi/v2/getObjectById.js +5 -0
- package/dist/openapi/v2/mapDocument.d.ts +8 -0
- package/dist/openapi/v2/mapDocument.js +11 -0
- package/dist/openapi/v2/mapExample.js +1 -1
- package/dist/openapi/v2/mapHeader.js +1 -1
- package/dist/openapi/v2/mapOperation.d.ts +8 -0
- package/dist/openapi/v2/mapOperation.js +73 -0
- package/dist/openapi/v2/mapParameter.js +1 -1
- package/dist/openapi/v2/mapPath.d.ts +8 -0
- package/dist/openapi/v2/mapPath.js +42 -0
- package/dist/openapi/v2/mapPathComponents.d.ts +8 -0
- package/dist/openapi/v2/mapPathComponents.js +14 -0
- package/dist/openapi/v2/mapPaths.d.ts +9 -0
- package/dist/openapi/v2/mapPaths.js +21 -0
- package/dist/openapi/v2/mapRequestBody.d.ts +2 -2
- package/dist/openapi/v2/mapRequestBody.js +2 -1
- package/dist/openapi/v2/mapResponse.d.ts +8 -0
- package/dist/openapi/v2/mapResponse.js +43 -0
- package/dist/openapi/v2/mapResponseComponents.js +2 -38
- package/dist/openapi/v2/mapSecurityRequirement.d.ts +8 -0
- package/dist/openapi/v2/mapSecurityRequirement.js +19 -0
- package/dist/openapi/v2/mapSecurityRequirements.d.ts +9 -0
- package/dist/openapi/v2/mapSecurityRequirements.js +30 -0
- package/dist/openapi/v2/mapSecuritySchemeComponents.js +1 -1
- package/dist/openapi/v2/mapServers.d.ts +8 -0
- package/dist/openapi/v2/mapServers.js +18 -0
- package/dist/openapi/v2/mapWebhooks.d.ts +9 -0
- package/dist/openapi/v2/mapWebhooks.js +21 -0
- package/dist/openapi/v2/openApiToSchemaGraph.js +18 -6
- package/dist/openapi/v2/types/index.d.ts +64 -12
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ export type HashId = string;
|
|
|
5
5
|
export type RefUuidMap = Record<string, UUID>;
|
|
6
6
|
export type UUIDObjectHashMap = Record<UUID, HashId>;
|
|
7
7
|
export type HashedNodeMap = Record<HashId, GraphNode>;
|
|
8
|
-
export type GraphNode = SchemaOrRef | ResponseOrRef | HeaderOrRef | ParameterOrRef | Media | ExampleOrRef | RequestBodyOrRef | SecuritySchemeOrRef | Server |
|
|
8
|
+
export type GraphNode = SchemaOrRef | ResponseOrRef | HeaderOrRef | ParameterOrRef | Media | ExampleOrRef | RequestBodyOrRef | SecuritySchemeOrRef | Server | PathOrRef | Operation | SecurityRequirement | Document;
|
|
9
9
|
export type SchemaObject = OpenAPIV3.SchemaObject | OpenAPIV3_1.SchemaObject;
|
|
10
10
|
export type RefObject = OpenAPIV3.ReferenceObject | OpenAPIV3_1.ReferenceObject;
|
|
11
11
|
export type SchemaOrRefObject = SchemaObject | RefObject;
|
|
@@ -19,10 +19,21 @@ export type SchemaOrRef = (SchemaOrRefObject & {
|
|
|
19
19
|
anyOf?: UUID[];
|
|
20
20
|
oneOf?: UUID[];
|
|
21
21
|
not?: UUID;
|
|
22
|
+
} & {
|
|
23
|
+
$ref?: never;
|
|
22
24
|
}) | (RefObject & {
|
|
23
25
|
$ref: UUID;
|
|
26
|
+
} & {
|
|
27
|
+
items?: never;
|
|
28
|
+
properties?: never;
|
|
29
|
+
additionalProperties?: never;
|
|
30
|
+
allOf?: never;
|
|
31
|
+
anyOf?: never;
|
|
32
|
+
oneOf?: never;
|
|
33
|
+
not?: never;
|
|
24
34
|
}) | HashId;
|
|
25
35
|
export type ResponseObject = OpenAPIV3.ResponseObject | OpenAPIV3_1.ResponseObject;
|
|
36
|
+
export type ResponseOrRefObject = ResponseObject | RefObject;
|
|
26
37
|
export type ResponseOrRef = (ResponseObject & {
|
|
27
38
|
headers?: {
|
|
28
39
|
[header: string]: UUID;
|
|
@@ -33,8 +44,14 @@ export type ResponseOrRef = (ResponseObject & {
|
|
|
33
44
|
links?: {
|
|
34
45
|
[link: string]: UUID;
|
|
35
46
|
};
|
|
47
|
+
} & {
|
|
48
|
+
$ref?: never;
|
|
36
49
|
}) | (RefObject & {
|
|
37
50
|
$ref: UUID;
|
|
51
|
+
} & {
|
|
52
|
+
headers?: never;
|
|
53
|
+
content?: never;
|
|
54
|
+
links?: never;
|
|
38
55
|
});
|
|
39
56
|
export type HeaderObject = OpenAPIV3.HeaderObject | OpenAPIV3_1.HeaderObject;
|
|
40
57
|
export type HeaderOrRefObject = HeaderObject | RefObject;
|
|
@@ -46,8 +63,14 @@ export type HeaderOrRef = (HeaderObject & {
|
|
|
46
63
|
content?: {
|
|
47
64
|
[contentType: string]: UUID;
|
|
48
65
|
};
|
|
66
|
+
} & {
|
|
67
|
+
$ref?: never;
|
|
49
68
|
}) | (RefObject & {
|
|
50
69
|
$ref: UUID;
|
|
70
|
+
} & {
|
|
71
|
+
schema?: never;
|
|
72
|
+
examples?: never;
|
|
73
|
+
content?: never;
|
|
51
74
|
});
|
|
52
75
|
export type ParameterObject = OpenAPIV3.ParameterObject | OpenAPIV3_1.ParameterObject;
|
|
53
76
|
export type ParameterOrRefObject = ParameterObject | RefObject;
|
|
@@ -59,8 +82,14 @@ export type ParameterOrRef = (ParameterObject & {
|
|
|
59
82
|
content?: {
|
|
60
83
|
[contentType: string]: UUID;
|
|
61
84
|
};
|
|
85
|
+
} & {
|
|
86
|
+
$ref?: never;
|
|
62
87
|
}) | (RefObject & {
|
|
63
88
|
$ref: UUID;
|
|
89
|
+
} & {
|
|
90
|
+
schema?: never;
|
|
91
|
+
examples?: never;
|
|
92
|
+
content?: never;
|
|
64
93
|
});
|
|
65
94
|
export type MediaObject = OpenAPIV3.MediaTypeObject | OpenAPIV3_1.MediaTypeObject;
|
|
66
95
|
export type Media = MediaObject & {
|
|
@@ -74,8 +103,12 @@ export type Media = MediaObject & {
|
|
|
74
103
|
};
|
|
75
104
|
export type ExampleObject = OpenAPIV3.ExampleObject | OpenAPIV3_1.ExampleObject;
|
|
76
105
|
export type ExampleOrRefObject = ExampleObject | RefObject;
|
|
77
|
-
export type ExampleOrRef = ExampleObject
|
|
106
|
+
export type ExampleOrRef = (ExampleObject & {
|
|
107
|
+
$ref?: never;
|
|
108
|
+
}) | (RefObject & {
|
|
78
109
|
$ref: UUID;
|
|
110
|
+
} & {
|
|
111
|
+
value?: never;
|
|
79
112
|
});
|
|
80
113
|
export type RequestBodyObject = OpenAPIV3.RequestBodyObject | OpenAPIV3_1.RequestBodyObject;
|
|
81
114
|
export type RequestBodyOrRefObject = RequestBodyObject | RefObject;
|
|
@@ -83,23 +116,37 @@ export type RequestBodyOrRef = (RequestBodyObject & {
|
|
|
83
116
|
content?: {
|
|
84
117
|
[contentType: string]: UUID;
|
|
85
118
|
};
|
|
119
|
+
} & {
|
|
120
|
+
$ref?: never;
|
|
86
121
|
}) | (RefObject & {
|
|
87
122
|
$ref: UUID;
|
|
123
|
+
} & {
|
|
124
|
+
content?: never;
|
|
88
125
|
});
|
|
89
126
|
export type SecuritySchemeObject = OpenAPIV3.SecuritySchemeObject | OpenAPIV3_1.SecuritySchemeObject;
|
|
90
127
|
export type SecuritySchemeOrRefObject = SecuritySchemeObject | RefObject;
|
|
91
|
-
export type SecuritySchemeOrRef = SecuritySchemeObject
|
|
128
|
+
export type SecuritySchemeOrRef = (SecuritySchemeObject & {
|
|
129
|
+
$ref?: never;
|
|
130
|
+
}) | (RefObject & {
|
|
92
131
|
$ref: UUID;
|
|
93
132
|
});
|
|
94
133
|
export type ServerObject = OpenAPIV3.ServerObject | OpenAPIV3_1.ServerObject;
|
|
95
134
|
export type Server = ServerObject;
|
|
96
135
|
export type PathObject = OpenAPIV3.PathItemObject | OpenAPIV3_1.PathItemObject;
|
|
97
|
-
export type
|
|
98
|
-
|
|
136
|
+
export type PathObjectOrRef = PathObject | RefObject;
|
|
137
|
+
export type PathOrRef = (PathObject & {
|
|
99
138
|
parameters?: UUID[];
|
|
100
139
|
} & {
|
|
101
140
|
[method in OpenAPIV3.HttpMethods]: UUID;
|
|
102
|
-
}
|
|
141
|
+
} & {
|
|
142
|
+
$ref?: never;
|
|
143
|
+
}) | (RefObject & {
|
|
144
|
+
$ref: UUID;
|
|
145
|
+
} & {
|
|
146
|
+
parameters?: never;
|
|
147
|
+
} & {
|
|
148
|
+
[method in OpenAPIV3.HttpMethods]: never;
|
|
149
|
+
});
|
|
103
150
|
export type OperationObject = OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject;
|
|
104
151
|
export type OperationExtensions = {
|
|
105
152
|
'x-mint'?: XMint;
|
|
@@ -122,11 +169,16 @@ export type Operation = OperationObject & {
|
|
|
122
169
|
servers?: UUID[];
|
|
123
170
|
} & OperationExtensions;
|
|
124
171
|
export type SecurityRequirementObject = OpenAPIV3.SecurityRequirementObject | OpenAPIV3_1.SecurityRequirementObject;
|
|
125
|
-
export type SecurityRequirement =
|
|
172
|
+
export type SecurityRequirement = {
|
|
173
|
+
[name: string]: {
|
|
174
|
+
$ref?: UUID;
|
|
175
|
+
scopes?: string[];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
126
178
|
export type DocumentObject = OpenAPIV3.Document | OpenAPIV3_1.Document;
|
|
127
|
-
export type Document = DocumentObject & {
|
|
128
|
-
servers
|
|
129
|
-
paths
|
|
130
|
-
webhooks
|
|
131
|
-
security
|
|
179
|
+
export type Document = Omit<DocumentObject, 'servers' | 'paths' | 'webhooks' | 'security'> & {
|
|
180
|
+
servers: UUID[];
|
|
181
|
+
paths: UUID[];
|
|
182
|
+
webhooks: UUID[];
|
|
183
|
+
security: UUID[];
|
|
132
184
|
};
|