RESTful API Modeling Language(RAML)
and its easy way to manage API
lifecycle from Design to deployment to sharing.It's concise and reusable,
you can use it again and again.There are many tools to write or design a
RAML.In Anypoint design center you can create a project and write the raml
for API's you are going to use.Therefore you can test your API to make sure
that it will be robust, easy to use.
We believe that RAML is a powerful language as a contract for APIs.
I have used RAML 1.0.
In raml we just need to design a sample request and response for the API
also we can define other resonse as well like what will be the response in
case of 400 and 404 etc status code.
You can also mock you services by enabling the Mocking Service checkbox in Design Center as follows:
After you are done with your raml you can import raml in your project using following option in anypoint studio.
Go to your project then right click and select Anypoint Platform and then
selct import from Design Center.
Raml file is created in your project under folder "src/main/api".It will
also create mule configuration file with Http listener , ApiKit Router
,Flow with endpoints and mapping-exception-strategy with basic status code
as following:
Now you can proceed with your Rest API Implementation.
Thank You!!
Comments
Post a Comment