@@ -53,18 +53,21 @@ export type ParseResult =
5353 | ( ParseOpenAPIResult < FlatOpenAPIV2 . Document > & {
5454 isEmptySpec : boolean ;
5555 from : 'git' | 'file' | 'url' | 'empty' | 'cloud' ;
56+ fileContext : SpecFromInput ;
5657 version : '2.x.x' ;
5758 context : ParseResultContext ;
5859 } )
5960 | ( ParseOpenAPIResult < FlatOpenAPIV3 . Document > & {
6061 isEmptySpec : boolean ;
6162 from : 'git' | 'file' | 'url' | 'empty' | 'cloud' ;
63+ fileContext : SpecFromInput ;
6264 version : '3.0.x' ;
6365 context : ParseResultContext ;
6466 } )
6567 | ( ParseOpenAPIResult < FlatOpenAPIV3_1 . Document > & {
6668 isEmptySpec : boolean ;
6769 from : 'git' | 'file' | 'url' | 'empty' | 'cloud' ;
70+ fileContext : SpecFromInput ;
6871 version : '3.1.x' ;
6972 context : ParseResultContext ;
7073 } ) ;
@@ -209,6 +212,7 @@ async function parseSpecAndDereference(
209212 const sourcemap = createNullSpecSourcemap ( spec ) ;
210213 return {
211214 jsonLike : spec ,
215+ fileContext : input ,
212216 sourcemap,
213217 from : 'empty' ,
214218 version : '3.0.x' ,
@@ -225,6 +229,7 @@ async function parseSpecAndDereference(
225229 ) ;
226230 return {
227231 jsonLike,
232+ fileContext : input ,
228233 sourcemap,
229234 version : checkOpenAPIVersion ( jsonLike ) ,
230235 from : 'cloud' ,
@@ -255,6 +260,7 @@ async function parseSpecAndDereference(
255260 ...parseResult ,
256261 version : checkOpenAPIVersion ( parseResult . jsonLike ) ,
257262 from : 'git' ,
263+ fileContext : input ,
258264 isEmptySpec : false ,
259265 context : {
260266 vcs : 'git' ,
@@ -273,7 +279,7 @@ async function parseSpecAndDereference(
273279 return {
274280 ...parseResult ,
275281 version : checkOpenAPIVersion ( parseResult . jsonLike ) ,
276-
282+ fileContext : input ,
277283 from : 'url' ,
278284 isEmptySpec : false ,
279285 context : null ,
@@ -303,6 +309,7 @@ async function parseSpecAndDereference(
303309
304310 return {
305311 ...parseResult ,
312+ fileContext : input ,
306313 version : checkOpenAPIVersion ( parseResult . jsonLike ) ,
307314 from : 'file' ,
308315 isEmptySpec : false ,
0 commit comments