Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: medusa-oas-cli doesn't find customizations and thus, doesn't include them in the generated combined.oas.json file #11445

Open
NicolasGorga opened this issue Feb 13, 2025 · 0 comments · May be fixed by #11447
Assignees

Comments

@NicolasGorga
Copy link

Package.json file

{
  "name": "medusa-starter-default",
  "version": "0.0.1",
  "description": "A starter for Medusa projects.",
  "author": "Medusa (https://medusajs.com)",
  "license": "MIT",
  "keywords": [
    "sqlite",
    "postgres",
    "typescript",
    "ecommerce",
    "headless",
    "medusa"
  ],
  "scripts": {
    "build": "medusa build",
    "seed": "medusa exec ./src/scripts/seed.ts",
    "start": "medusa start --types=false",
    "dev": "medusa develop --types=false",
    "db:migrate": "medusa db:migrate",
    "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
    "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit",
    "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit",
    "format": "prettier --write .",
    "lint": "eslint ./src ",
    "lint:fix": "eslint ./src --fix ",
    "generate:oas": "medusa-oas oas --type combined --paths ./src/api"
  },
  "dependencies": {
    "@medusajs/admin-sdk": "latest",
    "@medusajs/cli": "^2.1.0",
    "@medusajs/framework": "latest",
    "@medusajs/medusa": "latest",
    "@mikro-orm/core": "5.9.7",
    "@mikro-orm/knex": "5.9.7",
    "@mikro-orm/migrations": "5.9.7",
    "@mikro-orm/postgresql": "5.9.7",
    "awilix": "^8.0.1",
    "patch-package": "^8.0.0",
    "pg": "^8.13.0",
    "stripe": "^17.4.0"
  },
  "devDependencies": {
    "@eslint/js": "^9.15.0",
    "@medusajs/medusa-oas-cli": "^2.1.0",
    "@medusajs/test-utils": "latest",
    "@mikro-orm/cli": "5.9.7",
    "@swc/core": "1.5.7",
    "@swc/jest": "^0.2.36",
    "@trivago/prettier-plugin-sort-imports": "^4.3.0",
    "@types/jest": "^29.5.13",
    "@types/node": "^20.0.0",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.2.25",
    "eslint": "^9.15.0",
    "globals": "^15.12.0",
    "jest": "^29.7.0",
    "prettier": "^3.3.3",
    "prop-types": "^15.8.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.2",
    "typescript-eslint": "^8.15.0",
    "vite": "^5.2.11"
  },
  "engines": {
    "node": ">=20"
  }
}

Node.js version

v20.10.0

Database and its version

PostgreSQL 16.2

Operating system name and version

Windows 11

Browser name

Chrome

What happended?

When running medusa-oas oas --type combined --paths ./src/api to generate the oas file using medusa-oas-cli in Windows, no files are discovered and thus, customizations aren't included in the generated file.

A transient dependency of globby, fast-glob made a change in v10 release, that broke compatibility with Windows.

Expected behavior

Running medusa-oas oas --type combined --paths ./src/api discovers oas comments in my customizations and include them in the generated file.

Actual behavior

Running medusa-oas oas --type combined --paths ./src/api doesn't discover files in my customizations and thus, generates an incomplete file which doesn't include customizations.

Link to reproduction repo

https://github.com/mercurjs/mercur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants