-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[REQ] Allow generating only src/main/scala in sttp generator #6685
Comments
@ghostbuster91 we already support this using the ignore file. From the CLI perspective, you can try this out with:
Although, I'm not entirely sure what you intend to do as far as a scala compiler plugin. That seems like overkill and I'd recommend either using our SBT plugin (see https://github.com/OpenAPITools/sbt-openapi-generator/), or just wiring this up directly if you have more complex needs (see my example at https://github.com/jimschubert/sbt-local-generator). |
Thanks for the answer. By scala compiler plugin I meant sbt-plugin just like the one you linked (incorrect use of words, sorry). It took me a while to reply because while it looks like something we were looking for I wanted to check if it fulfills all our requirements. From my tests it looks like despite explicitly saying that we are only interested in This prevents us from plugging
Also to use it correctly with sbt we should be able to generate these files into For more information refer to: https://www.scala-sbt.org/1.x/docs/Howto-Generating-Files.html |
The idea is very similar to #6155. I would like to create a compiler plugin for sbt which generates only scala classes from openapi specification and puts them on the classpath.
As far as I got familiar with openApi generators while working on #6684 it seems to me that it might be quite easy to achieve that by just adding a single if statement into the sttpClientCode generator.
So the change would affect this method where we add templates to process:
First of all I might be wrong and it is not so simple after all. The second question is whether it should be done for the rest of scala generators or even for all generators.
@clasnake (2017/07), @jimschubert (2017/09) heart, @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04)
The text was updated successfully, but these errors were encountered: