Let's Build an API Together - Part 21

25.01.2018 by Jens in API Series | APIs | Newsletter

Yesterday we updated the endpoints in the API and today I was going to implement it in RAML and let the generator we use to create the Spring MVC code. However, I had another problem with the generator again as it wasn’t generating the createTask method anymore because I put the boardId in the path. Besides that, the code started to get messy with no added benefit anymore.

I tried a workaround and added an endpoint /tasks with a POST for creating a new task. It did generate the createTask Method again. Nonetheless, it was six controllers already for our simple application. It started to become messy and even experimenting with the generators naming scheme didn’t make it any better. Which made me reconsider the generator approach.

The generator did lose.

I still think it can be beneficial for a project with different constraint. So it is out, and I will be implementing the Controller by hand.

Did you follow along with the generator too? How did it go?


Want content like this in your inbox each workday? No BS, spam or tricks... just useful content:

I understand and agree to the privacy policy