Working with APIs
Working with APIs and using built-in HTTP clients looks straightforward but has some disadvantages. The biggest one is a lack of type safety. We recommend using auto-generated client libraries for a better developer experience while working with apaleo API.
Many different generators are available, but our advice is autorest. They all do the job well and generate similar proxy classes, but there is a small but crucial feature that only autorest has - it generates enums as string values. To understand why this is so important, let’s consider a case when a new value was added to an enum. For example, when a new status is introduced. By using string values, we don’t need to worry about possible deserialization issues, while enum will most likely throw an exception when meeting an unknown value.
To learn more about autorest, go to their GitHub autorest.