@mintlify/prebuild 1.0.728 → 1.0.729
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { removeLeadingSlash } from '@mintlify/common';
|
|
1
|
+
import { removeLeadingSlash, isAbsoluteUrl } from '@mintlify/common';
|
|
2
2
|
import { openApiToSchemaGraph, isOpenAPIV3orV31Document } from '@mintlify/validation';
|
|
3
3
|
import fse from 'fs-extra';
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
@@ -11,7 +11,10 @@ export const writeOpenApiData = async (openApiFiles) => {
|
|
|
11
11
|
for (const file of openApiFiles) {
|
|
12
12
|
const localUuid = uuidv4();
|
|
13
13
|
const filePath = `${openApiDataPath}/${localUuid}.json`;
|
|
14
|
-
const
|
|
14
|
+
const originalFileLocation = file.originalFileLocation || file.filename;
|
|
15
|
+
const trimmedOriginalFileLocation = isAbsoluteUrl(originalFileLocation)
|
|
16
|
+
? originalFileLocation
|
|
17
|
+
: removeLeadingSlash(originalFileLocation);
|
|
15
18
|
if (isOpenAPIV3orV31Document(file.spec)) {
|
|
16
19
|
const clonedSpec = JSON.parse(JSON.stringify(file.spec));
|
|
17
20
|
const graphData = openApiToSchemaGraph({
|