Questions tagged [raml-1.0]

19 questions
68
votes
1 answer

RAML 1.0 representation of Java Map

I have RAML schema which contains "javaType": "java.util.Map>" I have separate schema (employee.schema) available which represent class Employee. But as I have not used employee.schema in RAML so it is not…
Yogesh Prajapati
  • 4,770
  • 2
  • 36
  • 77
2
votes
0 answers

Mule-APIkit with baseUriParameter truncates resource path thus erroring out as 'resource not found'

Can anyone please suggest/correct me here on how to get APIkit Router working with baseUriParameter. If the path in the HTTP Listener Connector is hardcoded like /api/process/30001/*, it all works fine. APIKit Router is able to route the requested…
stof
  • 21
  • 4
1
vote
1 answer

How to make UriParameter as optional in RAML 1.0

There is a scenario for example as in any Application Controller while exposing a rest api we can make PathParams/UriParams as optional at controller level, so it wouldn't required always for client to pass it. Now I want to achieve same at RAML…
Rizwan Shakoor
  • 63
  • 3
  • 10
1
vote
2 answers

Validating query parameters in RAML

I need to create an API that has four possible HTTP query parameters. Either parameter one or parameter two is required. The others are optional. From the official RAML version 1.0 specification on Github, I found an almost exact scenario in the…
Tony
  • 2,658
  • 2
  • 31
  • 46
1
vote
1 answer

How to have two raml properties mutually exclusive?

I have a type in raml1.0 with 4 properties and I need to implement this case: Two properties out of the four exist only exclusively, so if one of them exists the other should not exist and if they both occur a propper error message is thrown to the…
Donia Zaela
  • 317
  • 1
  • 4
  • 15
1
vote
1 answer

How can a resourceType inherit from multiple types?

Goal: create resourceTypes for CRUD endpoints without repeating myself. (working with RAML 1.0 in Anypoint Studio and Mulesoft Design Center) Let's start a couple resourceTypes for single action endpoints: resourceTypes: getItem: get: …
AjimOthy
  • 701
  • 5
  • 13
1
vote
1 answer

RAML Max length of an item in a String array

I am defining a RAML spec. I have an attribute to hold an array of string. I want to make a rule that a string value in the array can have only maximum 3 charactors only (For example: regions: ["wes","nrh"] is valid. regions: ["lenghthyvalue",…
Débora
  • 5,816
  • 28
  • 99
  • 171
0
votes
2 answers

How to pass pre-defined set of comma separated values in a query parameter in raml?

There are four values: a,b,c,d and the query parameter "X" can be a combination of the four values. Eg - "X": a,b,c,d or "X": a,b,c etc.
0
votes
3 answers

RAML structure for Arrays

My JSON input is as below { "test" : ["t1259", "t2895"] } I want to generate RAML data type for the above as below but it is failing with the validation, please let me know whether the below RAML data type is the correct representation for the…
subhash
  • 19
  • 11
0
votes
1 answer

Concrete example of RAML 1.0 Example DataType

I didn't found any suitable example where Example is being used as DataType properly inside main RAML file. Mostly it's being used as .json/.xml file. Is there any proper detail or reference where I could find that. Using AnyPoint Platform design…
0
votes
1 answer

Dynamic call in RAML based on query params

Need help on dynamic call in query parameter in RAML. In RAML, I want to call .raml files which are in Examples folder dynamically. Through query param, if I send ?count=2 (example: https://anypointpoint.mulesoft.com/mocking/api?count=2) then …
satya
  • 1
  • 1
0
votes
1 answer

Validate headers using Raml

I have three headers A,B,C here A is always mandatory and either B or C should be present only one at a time in request. How to implement in raml 1.0
hyd_33
  • 9
  • 1
  • 6
0
votes
1 answer

RAML - how to design endpoints with parameters?

I have a requirement to design this spec using RAML: Resource: quantity Method: GET URL: {orderId}/{itemId}/quantity Objective is to pass orderId and itemId in the URI and get quantity. I am designing it this way: /{orderId}/{itemId}/quantity: …
ray
  • 4,210
  • 8
  • 35
  • 46
0
votes
1 answer

How to set multiple example requests and its responses in RAML

Can you tell me how to set in RAML 1.0, if its even possible, multiple requests and its responses as examples. I have in anypoint studio 5 api's and I want to merge them into one. I wanted to merge all raml files but dont know how to do it. In every…
BorisM
  • 1
  • 1
0
votes
1 answer

When creating an API Notebook with a hyphen separated resource name "/songs-list" , it gives an error

When creating an API Notebook with a hyphen seperated resource name "/songs-list" on RAML 1.0 , API Platform 2.0, it gives the below error : APINotebook Error API.createClient('client', '9c2861a1-b**b-401e-****-1ec*****b20c', 'testhyphen',…
1
2