@mintlify/scraping 4.0.222 → 4.0.223
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/scraping",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.223",
|
|
4
4
|
"description": "Scrape documentation frameworks to Mintlify docs",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"format:check": "prettier . --check"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@mintlify/common": "1.0.
|
|
41
|
+
"@mintlify/common": "1.0.367",
|
|
42
42
|
"@mintlify/openapi-parser": "^0.0.7",
|
|
43
43
|
"fs-extra": "^11.1.1",
|
|
44
44
|
"hast-util-to-mdast": "^10.1.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"typescript": "^5.5.3",
|
|
78
78
|
"vitest": "^2.0.4"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "b0102f271a5b552141116713d917f65a8ec4bf4b"
|
|
81
81
|
}
|
package/src/openapi/common.ts
CHANGED
|
@@ -89,6 +89,22 @@ const isExcludedOperation = (operation: MaybeOperationObjectWithExtensions) => {
|
|
|
89
89
|
return operation['x-excluded'];
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
+
const buildOpenApiMetaTag = ({
|
|
93
|
+
openApiFilePathFromRoot,
|
|
94
|
+
method,
|
|
95
|
+
path,
|
|
96
|
+
deprecated,
|
|
97
|
+
}: {
|
|
98
|
+
openApiFilePathFromRoot: string | undefined;
|
|
99
|
+
method: string;
|
|
100
|
+
path: string;
|
|
101
|
+
deprecated: boolean;
|
|
102
|
+
}): string => {
|
|
103
|
+
const filePath = openApiFilePathFromRoot ? `${openApiFilePathFromRoot} ` : '';
|
|
104
|
+
const label = deprecated ? ` deprecated` : '';
|
|
105
|
+
return `${filePath}${method} ${path}${label}`;
|
|
106
|
+
};
|
|
107
|
+
|
|
92
108
|
export function processOpenApiPath<N, DN>(
|
|
93
109
|
path: string,
|
|
94
110
|
pathItemObject: OpenAPIV3.PathItemObject,
|
|
@@ -122,9 +138,12 @@ export function processOpenApiPath<N, DN>(
|
|
|
122
138
|
const decoratedNavGroup = findNavGroup(decoratedNav, groupName);
|
|
123
139
|
|
|
124
140
|
const filenameWithoutExtension = generateUniqueFilenameWithoutExtension(navGroup, base);
|
|
125
|
-
const openapiMetaTag =
|
|
126
|
-
openApiFilePathFromRoot
|
|
127
|
-
|
|
141
|
+
const openapiMetaTag = buildOpenApiMetaTag({
|
|
142
|
+
openApiFilePathFromRoot,
|
|
143
|
+
method,
|
|
144
|
+
path,
|
|
145
|
+
deprecated: operation?.deprecated ?? false,
|
|
146
|
+
});
|
|
128
147
|
const { title: titleTag, description } = getOpenApiTitleAndDescription(
|
|
129
148
|
[
|
|
130
149
|
{
|
|
@@ -194,9 +213,12 @@ export function processOpenApiWebhook<N, DN>(
|
|
|
194
213
|
|
|
195
214
|
const filenameWithoutExtension = generateUniqueFilenameWithoutExtension(navGroup, base);
|
|
196
215
|
|
|
197
|
-
const openapiMetaTag =
|
|
198
|
-
openApiFilePathFromRoot
|
|
199
|
-
|
|
216
|
+
const openapiMetaTag = buildOpenApiMetaTag({
|
|
217
|
+
openApiFilePathFromRoot,
|
|
218
|
+
method: 'webhook',
|
|
219
|
+
path: webhook,
|
|
220
|
+
deprecated: operation?.deprecated ?? false,
|
|
221
|
+
});
|
|
200
222
|
|
|
201
223
|
const description = operation?.description;
|
|
202
224
|
|