chore: fix OAS circular dependencies (#7693)

This commit is contained in:
Shahed Nasser
2024-06-12 20:42:03 +03:00
committed by GitHub
parent 3693f61dc3
commit 7e7e6e3311
7 changed files with 29 additions and 8 deletions

View File

@@ -98,8 +98,8 @@ jobs:
- name: Run docblock generator
if: steps.check-commit.outputs.is_release_commit == 'true'
run: "yarn start run ../../../../packages/medusa/src/api --type oas && yarn start clean:oas"
working-directory: www/utils/packages/docblock-generator
run: "yarn generate:oas"
working-directory: www/utils
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_OWNER: ${{ github.repository_owner }}

View File

@@ -65,8 +65,8 @@ jobs:
- name: Generate References
if: ${{ github.event_name != 'workflow_dispatch' }}
run: "yarn start generate all --merge"
working-directory: www/utils/packages/typedoc-generate-references
run: "yarn generate:references"
working-directory: www/utils
- name: Generate Sidebar and File Map
run: "yarn prep"

View File

@@ -19,6 +19,13 @@ decorators:
- ProductCategoryResponse
AdminShippingOption:
- AdminShippingOption
AdminProductCategory:
- AdminProductCategory
- AdminProduct
BaseProduct:
- BaseProduct
StoreProduct:
- StoreProductCategory
# Similar config to /www/docs/docusaurus.config.js > redocusaurus
# Allows to emulate rendering of API public documentation when using `yarn redocly preview-docs openapi.yaml`

View File

@@ -7,7 +7,9 @@
"scripts": {
"build": "turbo run build",
"watch": "turbo run watch",
"lint": "turbo run lint"
"lint": "turbo run lint",
"generate:references": "turbo run generate:references",
"generate:oas": "turbo run generate:oas"
},
"dependencies": {
"@babel/core": "^7.23.0",

View File

@@ -6,7 +6,8 @@
"start": "node dist/index.js",
"build": "tsc",
"watch": "tsc --watch",
"prepublishOnly": "cross-env NODE_ENV=production tsc --build"
"prepublishOnly": "cross-env NODE_ENV=production tsc --build",
"generate:oas": "yarn start run ../../../../packages/medusa/src/api --type oas && yarn start clean:oas"
},
"publishConfig": {
"access": "public"

View File

@@ -6,7 +6,8 @@
"start": "node dist/index.js",
"build": "tsc",
"watch": "tsc --watch",
"prepublishOnly": "cross-env NODE_ENV=production tsc --build"
"prepublishOnly": "cross-env NODE_ENV=production tsc --build",
"generate:references": "yarn start generate all --merge"
},
"publishConfig": {
"access": "public"

View File

@@ -10,6 +10,16 @@
]
},
"lint": { },
"watch": { }
"watch": { },
"generate:references": {
"dependsOn": [
"^build"
]
},
"generate:oas": {
"dependsOn": [
"^build"
]
}
}
}