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 Plugin for Nx doesn't seem to be working with the latest NX #64

Closed devSarry closed 2 years ago

devSarry commented 2 years ago

I just tested out the plugin a new nx project, following the example provided in the docs, but it seems to fail when trying to run generate-sources for either the fetch or docs example.

Is there a way to get a more verbose error to see whats going on?

image

trumbitta commented 2 years ago

Hey, @devSarry thanks for checking the plugin out.

Any chance you stumbled upon this bug? https://github.com/trumbitta/nx-trumbitta/issues/44 Did it work with Nx v13 before?

devSarry commented 2 years ago

Maybe. I can close this issue. I had a couple of other issues plaguing me when getting started. I didn't realize I was missing the JAR dependancy for the openapi-generator. Ultimately I got it working using an online source for the spec file.

Not related to the original issue but the generated typescript output is throwing a bunch of typescript errors. Are you still using the tool?

trumbitta commented 2 years ago

Yes, I use it at work quite frequently. We use the typescript-rxjs generator, though.

AFAICT the kind of issues you are describing are not a surprise to me when it comes to using some generators. They are issues pertaining their side of things and in the past I had to comb through GitHub and SO to find workarounds and combinations of "additional properties" to make it work.

One of the worst issues was that some typescript generators create TS3 < 3.6 code by default and you have to use the right configuration to make them generate more modern code.

It's very unfortunate, because I don't know of any alternatives to OpenAPI Generator so we all just have to basically get what they are giving.

trumbitta commented 2 years ago

Oh, about the Java dependency! You might want to take a look at https://github.com/trumbitta/nx-trumbitta/pull/63 where @joeflateau is about to land the option for using docker instead!

devSarry commented 2 years ago

Yea looking forward to being able to have the option to use docker