How to add special character ($) in RAML in Mule 4

Pankaj Badi
3 min readMar 22, 2023

How to add special character in RAML in mule 4 using Any-point platform and studio

  1. This article helps you how to add special character ($) in RAML by below step by step.
  2. Login to Any point platform (https://anypoint.mulesoft.com/)
  3. Go to Design Center and you can be able to see create button as below.

4. In this RAML we are writing as per standard. In this we just taken 1 endpoint and uri-parameter and write the example in the Example folder.

5. RAML example as below mentioned.

/pankaj/{pankajid}/$metadata:

get:

description: the employee data

responses:

200:

body:

application/xml:

example: !include /Example/file.xml

6. In the RAML I am able to get endpoint as /pankaj and in this we have uri-parameter and special character $.

7. When we hit this endpoint in the any point platform we get below error

"message”: “Error validating the base uri for the path: /pankaj/1/$metadata. Resource path contains invalid characters. [$]”

error stating that we can't add any character as its showing invalid character error.

8. Now, just published the API in Any-point Exchange which will be like this in below screenshot.

9. Now just go to studio and create new project and import your api which is published in design center of platform.

10. In step 7, we see that whenever we hit our endpoint, we get an error stating that invalid character ($) is not allowed.

11. Now go to studio and right click on your project and deploy to cloud hub.

12. We can be able to see our Mule application in Runtime Manager in any point platform.

13. Now hit the url in the cloud hub for the below link.

http://testdemoproject.us-e2.cloudhub.io/api/pankaj/1/$metadata

14. Please find the response from the above url and below screenshot.

Conclusion:

Using above steps, you can be able to write the special character in the RAML in MuleSoft.

--

--

Pankaj Badi

Hello Techies, I always want to learn new things and acquire skills as there is no end for learning and growing