ResourceTypes and how you use them?



I am currently trying to see how the community is using resource-types in their API definition, or if they even use it and if not why?

Any comments are very welcome!



I’ve found resource-types to be very useful for composing traits and also for resource/schema associations.

Check this API definition I’ve worked on:

Not sure how I would have done that without resource types… lots of copy/pasting?


We are using RAML extensively for Talent App Store. RAML is awesome.

For our core APIs ( we have not found the need for resource types yet though we do use traits.

It seems to me that resource types may be more useful in business style APIs where there are multiple ways to access resources? e.g.:

GET /widgets/byColor/{color}
GET /widgets/bySize/{size}
GET /widgets/byWeight/{weight}

In this case there are lots of ways to reach the same resource - a set of widgets. From what I know of resource types they would be useful to avoid duplication here.


Awesome, thank you guys - hope to get more of these brilliant examples of how to use them correctly.