@@ -53,18 +53,21 @@ export type ParseResult =
53
53
| ( ParseOpenAPIResult < FlatOpenAPIV2 . Document > & {
54
54
isEmptySpec : boolean ;
55
55
from : 'git' | 'file' | 'url' | 'empty' | 'cloud' ;
56
+ fileContext : SpecFromInput ;
56
57
version : '2.x.x' ;
57
58
context : ParseResultContext ;
58
59
} )
59
60
| ( ParseOpenAPIResult < FlatOpenAPIV3 . Document > & {
60
61
isEmptySpec : boolean ;
61
62
from : 'git' | 'file' | 'url' | 'empty' | 'cloud' ;
63
+ fileContext : SpecFromInput ;
62
64
version : '3.0.x' ;
63
65
context : ParseResultContext ;
64
66
} )
65
67
| ( ParseOpenAPIResult < FlatOpenAPIV3_1 . Document > & {
66
68
isEmptySpec : boolean ;
67
69
from : 'git' | 'file' | 'url' | 'empty' | 'cloud' ;
70
+ fileContext : SpecFromInput ;
68
71
version : '3.1.x' ;
69
72
context : ParseResultContext ;
70
73
} ) ;
@@ -209,6 +212,7 @@ async function parseSpecAndDereference(
209
212
const sourcemap = createNullSpecSourcemap ( spec ) ;
210
213
return {
211
214
jsonLike : spec ,
215
+ fileContext : input ,
212
216
sourcemap,
213
217
from : 'empty' ,
214
218
version : '3.0.x' ,
@@ -225,6 +229,7 @@ async function parseSpecAndDereference(
225
229
) ;
226
230
return {
227
231
jsonLike,
232
+ fileContext : input ,
228
233
sourcemap,
229
234
version : checkOpenAPIVersion ( jsonLike ) ,
230
235
from : 'cloud' ,
@@ -255,6 +260,7 @@ async function parseSpecAndDereference(
255
260
...parseResult ,
256
261
version : checkOpenAPIVersion ( parseResult . jsonLike ) ,
257
262
from : 'git' ,
263
+ fileContext : input ,
258
264
isEmptySpec : false ,
259
265
context : {
260
266
vcs : 'git' ,
@@ -273,7 +279,7 @@ async function parseSpecAndDereference(
273
279
return {
274
280
...parseResult ,
275
281
version : checkOpenAPIVersion ( parseResult . jsonLike ) ,
276
-
282
+ fileContext : input ,
277
283
from : 'url' ,
278
284
isEmptySpec : false ,
279
285
context : null ,
@@ -303,6 +309,7 @@ async function parseSpecAndDereference(
303
309
304
310
return {
305
311
...parseResult ,
312
+ fileContext : input ,
306
313
version : checkOpenAPIVersion ( parseResult . jsonLike ) ,
307
314
from : 'file' ,
308
315
isEmptySpec : false ,
0 commit comments