sbt-openapi-generator icon indicating copy to clipboard operation
sbt-openapi-generator copied to clipboard

Difference between this project and upstart-commers/sbt-openapi-generator

Open ashleymercer opened this issue 5 years ago • 4 comments

Hi all,

What are the differences between this project and upstart-commerce/sbt-openapi-generator, and which is recommended? It looks like they have separate histories (reading this ticket) so would it make sense to combine efforts under a single official plugin?

Thanks :)

ashleymercer avatar Aug 01 '20 14:08 ashleymercer

👀 I'm interested to know that too.

JFCote avatar Oct 30 '20 14:10 JFCote

I'm not entirely sure what is going on with that repo.

My understanding from OpenAPITools/openapi-generator#3650 is that @YanDoroshenko and @chameleon82 were working to collaborate on Yan's implementation from that repository. There was a comment that the implementation from https://github.com/adenza/sbt-openapi-generator was considered feature complete, and that was the version presented in this repo.

To be honest, this plugin is a very simple wrapper around openapi-generator. It defines keys matching configurations that we have in the gradle wrapper, then just executes generation through openapi-generator as all other interfaces (CLI, build plugins, IDE plugins) do using CodegenConfigurator.

This project is different in that it also includes tasks for listing generators and performing generation. Because our generate task returns Def.Initialize[Task[Seq[File]]], SBT can keep track of file outputs from that task. The upstart-commerce version doesn't do this.

I know I'm biased, but even if I wasn't an OpenAPI Tools contributor, I'd choose this one for the file returns and SBT optimization that allows (see https://www.scala-sbt.org/1.x/docs/Howto-Track-File-Inputs-and-Outputs.html#File+outputs)

jimschubert avatar Feb 03 '21 02:02 jimschubert

Unfortunately @YanDoroshenko never reached me back and it is not clear about releasing cycle and future of https://github.com/upstart-commerce/sbt-openapi-generator (last activity 13 months ago) One more reason is to have sbt-plugin maintained by community.

chameleon82 avatar Feb 03 '21 06:02 chameleon82

@jimschubert Thank you for this explanation. I will definitely try this plugin in the near future because one of our project is using SBT (with play framework) and we currently use a .sh file with the .jar which is far for ideal.

JFCote avatar Feb 03 '21 12:02 JFCote