chore(medusa-oas-cli,oas-github-ci): remove v2 option + generate v2 by default (#7304)

* chore(medusa-oas-cli,oas-github-ci): remove v2 option + generate v2 by default

* fixes to changeset

* fix public url path
This commit is contained in:
Shahed Nasser
2024-05-13 17:01:38 +03:00
committed by GitHub
parent 63623422fe
commit 8b2429d24f
10 changed files with 111 additions and 926 deletions

View File

@@ -7,11 +7,9 @@ const execa = require("execa")
const isDryRun = process.argv.indexOf("--dry-run") !== -1
const withFullFile = process.argv.indexOf("--with-full-file") !== -1
const v2 = process.argv.indexOf("--v2") !== -1
const basePath = path.resolve(__dirname, `../`)
const repoRootPath = path.resolve(basePath, `../../../../`)
const docsApiPath = v2 ? path.resolve(repoRootPath, "www/apps/api-reference/specs-v2") :
path.resolve(repoRootPath, "www/apps/api-reference/specs")
const docsApiPath = path.resolve(repoRootPath, "www/apps/api-reference/specs")
const run = async () => {
const oasOutDir = isDryRun ? await getTmpDirectory() : docsApiPath
@@ -25,9 +23,6 @@ const run = async () => {
const generateOASSource = async (outDir, apiType) => {
const commandParams = ["oas", `--type=${apiType}`, `--out-dir=${outDir}`, "--local"]
if (v2) {
commandParams.push(`--v2`)
}
const { all: logs } = await execa(
"medusa-oas",
commandParams,