We will explain the usage of library fragment in raml. Library is one of the Raml Fragments. Main advantage of the raml Library is that is can defined multiple types and that can be referred from RAML file.
Step1:-
Log in to Anypoint platform
Step2:-
Click on design center and click on Create Fragments
Step3:-
Provide the name for new fragment
Step4:-
Update the RAML with below information
Define the Individual DataType which is included as part of library
Notepoint:-
Once you create the Library as a fragment you can publish it on exchange to make it reusable across organization, else you can also use this inside individual raml specification in that case you can first create a RAML specification and add the file as a library .
Step5:-
we use “uses: “ to include the library and also refer this from exchange, in case of library it is not required to use “!include” to include the library.