-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[REQ] Creating a new generator using Kotlin as language #1894
Comments
I'm a little confused by the request. We have 2 Kotlin server generators and a Kotlin client generator which supports a handful of libraries/options. Your description discusses python and Haskell generators and then comments about liking Kotlin. Are you looking for instructions to contribute a new generator for a framework that you're creating? If so, please use the kotlin-spring or kotlin generators as examples. |
I do not want to write a kotlin generator for now. I want to write a python generator in kotlin |
Can you please elaborate on that before creating a new generator? Is the issue with the Python Flask generator of Python AIOHTTP server? cc @Jyhess (creator of Python AIOHTTP server generator? cc @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) |
The issue is with both flask and client. I do not know anything about the first. About the problem in python-flask: One further thing which I personally do not like: |
I see, thanks for the clarification! I had discussed using Kotlin with the core team, and we decided to stay with Java as we perform some large refactors over the next couple of releases… then we'd evaluate again later. I also like Kotlin (it's what I've written intellij-openapi-generator in). openapi-generator supports three generator/template types:
As already suggested above, the generator/template maintainers may be able to offer a recommendation for an approach. We also welcome community contributions to improve all generators. Sometimes we do have edge cases or special use cases that don't seem to fit into the built-in generators. If that is the case, you can make your own private generator. Even as a core team member, I've made a few custom generators at work. To create a user-defined generator, you can use the You can see a full example of extending a built-in generator (and how to consume this) in this repo: https://github.com/jimschubert/custom-generator-example. I have an open pull request to improve our documentation strategy, and you can check out the customization doc from my branch here: https://github.com/OpenAPITools/openapi-generator/blob/0750ef9337681ebb0268919398a67bcc7d9ea98d/docs/customization.md |
Thank you for your response. I suppose that I the core team plans a clean up in the future that every generator will be removed from the core module and will be put into a custom module which could be included into the core via maven/gradle. |
@Fjolnir-Dvorak to clarify, we don't have plans to extract out generators to separate projects/modules or repos. Our plans are centered around refactoring the core code such that we can better hide internals and expose a cleaner public API to be consumed by authors of both custom generators and custom templates. For details, you can check out our Roadmap. |
Ok, thank you. I guess that the main question if kotlin can be used as an alternative to java to write the code was rejected leaving the new question open if a new generator should be implemented as a core-generator or as a module where I do not know how users should find whose in the wonky wide web which was not the primary question of this ticket so I guess the question is answered and I can close the ticket. |
I want to create a new python generator that is inspired by the Haskell generator. The current python-generator for a server is not usable without editing the generated code. I want to create a new one where no single code change is necessary to get a working server to ease the process of updating the server without the need to merge the code changes manually.
I really appreciate the language Kotlin along with its type safety and null safety which makes it easier to produce a more readable and secure code base.
The text was updated successfully, but these errors were encountered: