10. Here, we can see that we have created a template resourceTypes where
we are defining both the methods GET and POST.
We are also setting description and response format for both the
methods.
Also, we are referring the response example from parameters :-
11. Now, we are defining a resource that will call and use this resourceTypes
template.
Infact this makes easy to reuse the code, without repeating the method
structure again and again for any other resources.
Here we can see that, the resource /books is calling and using the resourceTypes
template.
So, now the /books resource will have both the method GET and POST defined in the
template. Also, the response format is taking the response parameter from here