docs: add generator for llms-full.txt (#11323)
* initial * improvements * finished implementation * transform links to index.html.md links * fix for resources
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
"autoprefixer": "10.4.14",
|
||||
"clsx": "^2.0.0",
|
||||
"docs-ui": "*",
|
||||
"docs-utils": "*",
|
||||
"jsdom": "^22.1.0",
|
||||
"json-schema": "^0.4.0",
|
||||
"json-stringify-pretty-compact": "^4.0.0",
|
||||
|
||||
@@ -6,6 +6,7 @@ import readSpecDocument from "./read-spec-document"
|
||||
import getSectionId from "./get-section-id"
|
||||
import dereference from "./dereference"
|
||||
import { unstable_cache } from "next/cache"
|
||||
import { oasFileToPath } from "docs-utils"
|
||||
|
||||
async function getPathsOfTag_(
|
||||
tagName: string,
|
||||
@@ -25,9 +26,7 @@ async function getPathsOfTag_(
|
||||
|
||||
return {
|
||||
...fileContent,
|
||||
operationPath: `/${file
|
||||
.replaceAll(/(?<!\{[^}]*)_(?![^{]*\})/g, "/")
|
||||
.replace(/\.[A-Za-z]+$/, "")}`,
|
||||
operationPath: oasFileToPath(file),
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user