-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rewrite api generation to support older versions; configure v8.…
…6 of operate API generation
- Loading branch information
1 parent
237c326
commit 8116292
Showing
4 changed files
with
2,134 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
const { makeServerDynamic } = require("../make-server-dynamic"); | ||
const removeDuplicateVersionBadge = require("../remove-duplicate-version-badge"); | ||
|
||
const outputDir = "docs/apis-tools/operate-api/specifications"; | ||
const specFile = "api/operate/operate-openapi.yaml"; | ||
|
||
function preGenerateDocs() { | ||
makeServerDynamic(specFile); | ||
function preGenerateDocs(config) { | ||
makeServerDynamic(config.specPath); | ||
} | ||
|
||
function postGenerateDocs() { | ||
removeDuplicateVersionBadge(`${outputDir}/operate-public-api.info.mdx`); | ||
function postGenerateDocs(config) { | ||
removeDuplicateVersionBadge( | ||
`${config.outputDir}/operate-public-api.info.mdx` | ||
); | ||
} | ||
|
||
module.exports = { | ||
outputDir, | ||
preGenerateDocs, | ||
postGenerateDocs, | ||
}; |
Oops, something went wrong.