blogccasion

Generate Java from your WADL REST API Descriptions with REST Describe & Compile

Generate Java from your WADL REST API Descriptions with REST Describe & CompileJava Duke

After a busy week finally one of the more important mission objectives has been accomplished: REST Describe & Compile v0.3 generates Java. Java is kind of 1990's. You need to explicitly create getters and setters, the strict static typing hinders you from simply comparing an int to null, for each optional parameter you need to create an own constructor, each file needs to be compiled before it can be tested,…

One of the more subtile problems are types. Internally all types are Strings (this is what goes on the POST or GET wire), however, Java adds a typed layer on top of this. This means that for the getters you need to make sure that the type is toString()-able, whereas for the setters the correct type is strictly enforced. I am pretty biased, but in my opinion strict typing is anti-web.

Whatever, version 0.3 brings another fun feature. Thanks to my wonderful future wife and in response to Eduard Pelegri i Llopart's blog entry REST Describe & Describe is now also available in Catalan. Setze jutges :-)

You can download the source code from the project's Google Code site, and as always the latest version is available from my web space.

Image from dailly.info