Snippets, samples and some codes

TechBlog for Software Developers. Usually talk about Java Technologies and Software Engineering | Panitz Techblog is written by Viltér Panitz

Rest API Documentation with Swagger — September 20, 2016

Rest API Documentation with Swagger

This time I would like to share one amazing tool that I always use when I develop a new RESTFul service. It’s called Swagger.

A POWERFUL INTERFACE TO YOUR API
Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability. (Swagger.io)

You can check it at http://swagger.io/ Continue reading

How to Work with Enum in Groovy — September 11, 2016

How to Work with Enum in Groovy

Enum in Groovy are pretty much the same as Java, but with some Groovyness 🙂
I’m going to show 3 different ways to create an Enum with Groovy.
  1. The traditional one
  2. With static Map
  3. Without constructor (yes, you can do it!)
The example will be the same in all of them. Suit card game.
As you may know, cards are divided in 4 Suits. Spade, Heart, Club and Diamond.
The idea is to create an Enum that represents the name and the color of each one.

Continue reading

Putting Spring, Groovy and Gradle together — September 7, 2016
First blog post — April 21, 2016