I agree with you that some generators are less mature. For example, we just added a Crystal client generator several weeks ago and we only have tests for posting a JSON body and getting it back to verify the result. Features like oneOf, anyOf are not yet supported (of course we welcome contributions to improve the Crystal client generator).
You can use customized templates (e.g. via -t option in the CLI) to meet your unique requirements. Another tips is to use
code formatter such as https://prettier.io/, eslint etc to format the auto-generated code based on the style you want.
This is not to say it has more languages supported than Protobuf as I do not know exactly how many generators out there supporting Protobuf.
(OpenAPI Generator also comes with the generator/converter that converts OpenAPI spec documents into gRPC and protocol buffer schema files. Not sure if OpenAPI Generator is also counted as a generator for Protobuf)
> Does OpenAPI generate code for you? I have worked on projects that use it and didn't have any generated code, so I am assuming not...
Please give OpenAPI Generator [1] a try to generate clients, servers stubs, documentation, schemas (graphql, protobuf, etc) and more. It supports many programming languages and many companies are already using it [2]:
If you want to access RESTful APIs via OCaml, you may consider using OpenAPI Generator to generate the OCaml client automatically instead of manually creating one. Here are 3 simple steps to do so:
There were discussions on type hints but unfortunately no one has found the time to make the contribution yet.
We also have a new `python-experimental` client generator that has better support for new features in OAS v3. Please check it out to see if it works better for you.
We just added oneOf support to the Java client generator a few weeks ago. The enhancement will be included in the upcoming 4.3.0 release. You can give it a try with the latest snapshot version for the time being.
For C++, I don't think anyone has contributed the OAUTH2 enhancement to the C++ client generator (cpp-qt5, cpp-restsdk) yet. We definitely welcome the contributions.
For Java, I agree there are rooms for improvements as we cover so many different libraries (jersey2, retrofit2, openfeign, resttemplate, etc) and a good starting point is https://github.com/OpenAPITools/openapi-generator/tree/maste... and we can plot the OAuth-related enhancements back to the template more easily.
I remember there were discussions about adding typing to the Python client before but I don't think anyone has time to implement it yet. If you've time to make the contribution, please let me know by opening an issue/ticket: https://github.com/OpenAPITools/openapi-generator/issues/new
We've also added a protobuf schema generator (`protobuf-schema`) to convert OpenAPI spec v2,v3 to protocol buffer schemas. Please give it a try to see if it helps in your use cases.
FYI. One way to automatically generate API clients is to use OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator), which is free, open-source and supports 30+ programming languages.
Disclosure: I'm the top contributor to the project.
Fast forward to today, we just released OpenAPI Generator v4.0.0 - the 20th release since the fork, thanks to the awesome contributions from the vibrant developer community. Please refer to the release note (https://github.com/OpenAPITools/openapi-generator/releases/t...) for more information about the release.
Not sure which code generation tool you used but if you've time, please try OpenAPI Generator (https://openapi-generator.tech) and let us know if you've any feedback.
Please give it a try to see if you like it.