trumbitta / nx-trumbitta

💡An attempt to start collecting all of my Nx-related Open Source work in a mono-repo.
MIT License
47 stars 11 forks source link

OpenAPI generator plugin doesn't seem to work with the latest NX #85

Open cromefire opened 9 months ago

cromefire commented 9 months ago

It seems that the plugin still references the old @nwrl namespace which doesn't seem to be present in current NX anymore:

>  NX  Generating @trumbitta/nx-plugin-openapi:api-spec

✔ Do you want me to also create a sample spec file for you? (y/N) · false

 >  NX   Cannot find module '@nrwl/workspace/src/utilities/run-tasks-in-serial'

   Require stack:
   - /node_modules/@trumbitta/nx-plugin-openapi/src/generators/api-spec/generator.js
   - /node_modules/nx/src/config/schema-utils.js
   - /node_modules/nx/src/command-line/generate/generator-utils.js
   - /node_modules/nx/src/command-line/generate/generate.js
   - /node_modules/nx/src/command-line/generate/command-object.js
   - /node_modules/nx/src/command-line/nx-commands.js
   - /node_modules/nx/bin/init-local.js
   - /node_modules/nx/bin/nx.js
   - .nvm/versions/node/v18.18.2/lib/node_modules/nx/bin/nx.js
   Pass --verbose to see the stacktrace.

so it would probably be nice if that was updated to reference the current packages.

rfellows commented 9 months ago

I'm seeing the same issue.

vegetablesalad commented 8 months ago

Having the same issue

jase88 commented 8 months ago

@trumbitta is there a good way to support on this one? Are you working on it or are you accepting PRs?

vegetablesalad commented 8 months ago

@jase88 last accepted PR was in 2022, looks like this is not maintained. I just created the lib manually and added generation command to the lib configuration.

"generate": {
      "executor": "nx:run-commands",
      "options": {
        "command": "npx openapi --input ./libs/client-api/spec/client-api.yaml --output ./libs/client-api/src --name ClientApi"
      }
}
driimus commented 4 months ago

If anyone's looking for workarounds, I've got a fork that targets NX 19 - https://www.npmjs.com/package/@driimus/nx-plugin-openapi