
Questions: 23,663 //
Answers: 52,178 //
Contributing Members: 17,934
Hi All,
When we are creating API specification we can create some fragments (which I think is small re-usable components to be used in specification) where we got option like Trait, resourceType,Library, DataType etc..
Can anyone please help to understand when to use which type and what is exact of this fragments . Is there other uses apart from using inside specification as reference.
4 days ago, mulsoft answered with:
Hi Mate,
Fragment is only used in API specifications. It can be standalone project which you published to Exchange and later point of time Just use as dependency in API specifications.
It's only reusable to achieve API Led approach. When You are developing API in Mule ,try to design in a such a way other can reuse it....
Treat API as a Product not as a project. And Fragment has important role in RAML for reusability point of view.
Thanks,
Manish Kumar Yadav
MuleSoft Forum Moderator