Auto VS openapi-generator

Compare Auto vs openapi-generator and see what are their differences.

Auto

A collection of source code generators for Java. (by google)

openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3) (by OpenAPITools)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
Auto openapi-generator
14 234
10,372 19,899
0.2% 1.9%
9.3 9.9
about 14 hours ago 2 days ago
Java Java
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Auto

Posts with mentions or reviews of Auto. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-27.
  • Any library you would like to recommend to others as it helps you a lot? For me, mapstruct is one of them. Hopefully I would hear some other nice libraries I never try.
    21 projects | /r/java | 27 May 2023
    I like to use AutoService to make using Java's ServiceLoader easier.
  • Autowiring In Spring, its implementation, limitations, Best Practices and Considerations While Using It
    1 project | /r/programming | 28 Mar 2023
    I've also had great luck combining that with AutoValue to allow production vs test injections without the new Foo(thing, null, null, null, thing2, null, null) situation:
  • Java records make Google's AutoValue mostly obsolete
    2 projects | /r/java | 2 Dec 2022
    AutoValue has posted a new doc comparing itself to Java record classes. (Records were new in Java 16, or earlier with --enable-preview.)
  • Don’t call it a comeback: Why Java is still champ
    17 projects | news.ycombinator.com | 9 Aug 2022
    That means I don't forget about fields (as can happen if you're just doing `person.setX()` all the time). It's easy to see what is what when reading it. I can delete fields I don't want to initialize at the time. Yes, maybe immutable objects are the One True Way, but C# lets me choose (I can label properties with an initializer `init` rather than a setter `set` and then they're immutable).

    Kotlin offers stuff like this too because it's really useful toward creating code that's easy to create and maintain. Go also lets you initialize structs in a similar fashion.

    Java has come back to us a decade or more late with records. They're not bad, but they're only offering one thing. They don't cover what C#, Kotlin, Go, and other languages have offered for so long.

    The annoying thing about Java is that it doesn't feel pragmatic a lot of the time. It feels like the language hates stealing ideas from others. It's Java: people steal ideas from Java, not the other way around. People do crazy things just to get POJOs including Immutables (http://immutables.github.io), AutoValue (https://github.com/google/auto/), Lombok (https://projectlombok.org), Joda Beans (https://www.joda.org/joda-beans/), and maybe more. They generate lots of code at compile time or do funky runtime stuff.

    It just feels like Java misses the pragmatic stuff and still kinda doesn't want to handle that. I feel a bit silly harping on things like POJOs and setting data on a new object, but that's a big part of day-to-day stuff and it definitely pushes users away from Java towards languages that seem "better" simply because they don't have Java's oddly strong attachment to not offering simple value objects. Yes, again, records do something - but it feels like Java ignored how people are using Kotlin, Go, C#, and more and didn't go for something that would have been as widely applicable and pragmatic as it could have been.

    Java has a lot of great stuff like great GCs (yes), lots of cool research, great performance, and Project Loom is really exciting. I just wish the language would lean a little more practical.

  • poor java
    1 project | /r/ProgrammerHumor | 7 Jun 2022
    The main disadvantage of Java is the boilerplate and the fact that you don't get cool metaprogramming features. The boilerplate can be reduced with tools like AutoValue. The lack of monkey patching and crazy SFINAE template shenanigans is that it is much easier to look at some piece of code and know what it's calling. You have static types, so you can jump to the method definition reliably (as opposed to Python), and there aren't many subtle syntax features that can trip you up (like lvalue vs rvalue references in C++). You can absolutely make a mess of Java with crazy frameworks, but the fact that the language itself has simple syntax means that nobody else in the organization can do anything too clever.
  • TclTutor 3: Computer aided instruction package for learning the Tcl language
    1 project | news.ycombinator.com | 14 Feb 2022
    There is no way you can tell that's valid Common Lisp without actually compiling and executing the code in the json-reader.lisp file. When the compiler gets to (enable-json-syntax), it sees that it is a macro so it executes its code at compile-time. That code then redefines the meaning of the { and [ characters to be the start of JSON objects/arrays (instead of their normal meaning in Common Lisp), and installs code telling Common Lisp how to parse JSON syntax, which is triggered when those characters are encountered in input. The example-object function shows an example of using it. Finally, (disable-json-syntax) is another macro, also executed at compile time, which undoes those changes to the Common Lisp syntax.

    Common Lisp did not invent the idea of allowing a program to dynamically alter the language syntax as it was being parsed; I believe the idea was first introduced in Maclisp, and from there spread to other LISP dialects (such as Franz Lisp and Interlisp) before finally being standardised in Common Lisp. The originators of Scheme intentionally decided to leave this feature out, but some implementations/descendants of Scheme have added it back in, such as Racket [1], Guile [2], and Chicken Scheme [3]. Other Lisp-family languages (such as Clojure or Emacs Lisp) have resisted calls to add it, despite encouragement from certain quarters.

    Earlier you spoke of "Tcl's lack of a grammar up against Scheme, Lisp", but if runtime-extensible syntax is a form of "lack of a grammar", then many Lisp family languages lack grammar too.

    Another language for which this is true (albeit to a significantly lesser degree), is Java. With Java, you can run arbitrary code at compile time by defining an annotation processor. The annotation processor code is run when the annotation is encountered. The annotation processor is allowed to issue compilation errors. It can also generate more source code for additional classes, which gets added to the compilation process, and your program may refer some of those generated classes, and hence need that generated code to compile–for an example see [4] from the Google AutoValue docs, where the "AutoValue_Animal" class being constructed in the create() method is dynamically generated by a processor which is triggered by the @AutoValue annotation. So, if your Java program contains annotations with an associated processor, and if you define "syntactically correct" as "compiles without any errors", then you can't know if the Java program is syntactically correct without executing arbitrary Java code.

    [0] https://gist.github.com/chaitanyagupta/9324402

    [1] https://docs.racket-lang.org/reference/Reader_Extension.html

    [2] https://www.gnu.org/software/guile/manual/html_node/Reader-E...

    [3] https://wiki.call-cc.org/man/5/Module%20(chicken%20read-synt...

    [4] https://github.com/google/auto/blob/master/value/userguide/i...

  • Magic Beans - automatic get/set, equals, hashCode, toString without any compiler hacks
    4 projects | /r/java | 22 Jan 2022
    Reminds me of Google’s AutoValue: https://github.com/google/auto/tree/master/value
  • What are some of your tips for improving the Java development experience?
    5 projects | /r/java | 11 Jan 2022
    Records where you can, and because Lombok is controversial, Immutables is the other alternative (or autovalue). Actually, all code generation tools are fantastic: Immutables, MapStruct, jOOQ...
  • So true
    1 project | /r/ProgrammerHumor | 4 Jun 2021
    Via Lombok, yes, which, as of now, is a default plugin in Idea, which everyone is using anyway. If you don't like Lombok particularly (and god knows, I can't imagine why), there is an alternative made by Google called Auto. Or you can use Scala, which has some features like that natively and is 100% interoperable with Java (meaning you can make a new Scala file within the current project and start using it right away). I imagine Kotlin also has some syntax sugar; however, I am not familiar with Kotlin very well.
  • How to Write an Equality Method in Java (2009)
    1 project | news.ycombinator.com | 30 Apr 2021
    For immutable value types, AutoValue[1] is a nice library for automating this. Lombok[2] is also popular, but a lot of orgs avoid it because it has some pretty deep dependencies on implementation details of the JDK that aren't guaranteed to be stable across releases. It seems well-maintained in practice, thoguh. Once Java records[3] are out of preview, they will probably be the preferred approach, but it will be a while before most teams are on a version of the JDK that supports them.

    For mutable objects, the notion of equality is hairy in general, because what you want often depends on why you'd be comparing the two objects. You might have two mutable objects that can be meaningfully compared in your business logic, but absolutely should not be used as keys in a map. Often you can satisfy your goals by implementing a separate method that does not attempt to conform to the 'equals' contract, which ensures it will not unintentionally be used for e.g. data structure ordering.

    [1] https://github.com/google/auto/blob/master/value/userguide/i...

    [2] https://projectlombok.org/features/EqualsAndHashCode

    [3] https://blogs.oracle.com/javamagazine/records-come-to-java

openapi-generator

Posts with mentions or reviews of openapi-generator. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-24.
  • The Stainless SDK Generator
    10 projects | news.ycombinator.com | 24 Apr 2024
    Disclaimer: We're an early adopter of Stainless at Mux.

    I've spent more of my time than I'd like to admit managing both OpenAPi spec files [1] and fighting with openapi-generator [2] than any sane person should have to. While it's great having the freedom to change the templates an thus generated SDKs you get with using that sort of approach, it's also super time consuming, and when you have a lot of SDKs (we have 6 generated SDKs), in my experience it needs someone devoted to managing the process, staying up with template changes etc.

    Excited to see more SDK languages come to Stainless!

    [1] https://www.mux.com/blog/an-adventure-in-openapi-v3-api-code...

    [2] https://github.com/OpenAPITools/openapi-generator

  • FastAPI Got Me an OpenAPI Spec Really... Fast
    4 projects | dev.to | 22 Apr 2024
    As a result, the following specification can be used to generate clients in a number of different languages via OpenAPI Generator.
  • Show HN: Manage on-prem servers from my smartphone
    3 projects | news.ycombinator.com | 27 Mar 2024
    Of course you can compile the server from source if you have Go and the OpenAPI generator JAR (https://github.com/OpenAPITools/openapi-generator?tab=readme...)

    Follow these steps : https://github.com/c100k/rebootx-on-prem/blob/master/.github...

    And then :

    (cd ./impl/http-server-go && GOARCH=amd64 GOOS=openbsd go build -o /app/rebootx-on-prem-http-server-go-openbsd-amd64 -v)

    By adapting the arch if needed. Not tested, but it should work.

  • OpenAPI Generator v7.3.0 has new generators for Rust, Kotlin, Scala and Java
    1 project | news.ycombinator.com | 8 Feb 2024
  • Stop creating HTTP clients manually - Part I
    1 project | dev.to | 5 Feb 2024
    TL;DR: Start generating your HTTP clients and all the DTOs of the requests and responses automatically from your API, using openapi-generator instead of writing your own.
  • How to Automatically Consume RESTful APIs in Your Frontend
    13 projects | dev.to | 25 Jan 2024
    As an alternative, you can also use the official OpenAPI Generator, which is a more generic tool supporting a wide range of languages and frameworks.
  • Building a world-class suite of SDKs is easy with Speakeasy
    4 projects | dev.to | 10 Jan 2024
    I trialed generating SDKs using the OpenAPI Generator package, which was largely unsatisfactory.
  • Best way to implement base class for API calls?
    2 projects | /r/csharp | 7 Dec 2023
    If Swagger/OpenAPI is available, save yourself a lot of trouble and generate the client using OpenAPI Generator. If not, use a library like RestEase to make it significantly easier to create the client.
  • Sharing EF data access project DLL vs NuGet vs ?
    1 project | /r/dotnet | 7 Dec 2023
    For a run of the mill REST API you should generate OpenAPI (Swagger) info for the API using a library like NSwag or Swashbuckle. You'd want to do this no matter what because it's documentation for the API, but the bonus is that you can use it with tools like OpenAPI Generator to create API client code and models in a variety of languages. You certainly can create an API client library manually, it would entail having a nuget package with a class library that contains the models and client code for calling the endpoints (which I'd create using a lib such as RestEase unless you just enjoy writing boilerplate code by hand). However 95% of the time it simply isn't worth creating your own lib when OpenAPI is available because once you've done it a time or two it takes less than 5 min to run the generator and create (or update) a lib.
  • Created an API using Gin, want to create sdk for him
    3 projects | /r/golang | 7 Dec 2023
    Then you can use oapi-codegen or openapi-generator to generate the Go (or other language) SDK for it.

What are some alternatives?

When comparing Auto and openapi-generator you can also consider the following projects:

Lombok - Very spicy additions to the Java programming language.

NSwag - The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.

Immutables - Annotation processor to create immutable objects and builders. Feels like Guava's immutable collections but for regular value objects. JSON, Jackson, Gson, JAX-RS integrations included

oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications

JHipster - JHipster, much like Spring initializr, is a generator to create a boilerplate backend application, but also with an integrated front end implementation in React, Vue or Angular. In their own words, it "Is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures."

SvelteKit - web development, streamlined

Mockneat - MockNeat - the modern faker lib.

smithy - Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.

Tale - 🦄 Best beautiful java blog, worth a try

django-ninja - 💨 Fast, Async-ready, Openapi, type hints based framework for building APIs

JavaParser - Java 1-17 Parser and Abstract Syntax Tree for Java with advanced analysis functionalities.

autorest - OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python