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

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

Open
cromefire opened this issue Dec 22, 2023 · 5 comments
Open

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

cromefire opened this issue Dec 22, 2023 · 5 comments

Comments

@cromefire
Copy link

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
Copy link

I'm seeing the same issue.

@vegetablesalad
Copy link

Having the same issue

@jase88
Copy link

jase88 commented Feb 8, 2024

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

@vegetablesalad
Copy link

@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
Copy link

driimus commented May 12, 2024

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

@cromefire cromefire changed the title OpenAPI generator plugin doesn seem to work with the latest NX OpenAPI generator plugin doesn't seem to work with the latest NX May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants