Repeated URL Parameters


I am just starting to use RAML.

Most Web toolkits such as the servlet API in Java provide a list of parameter values for handling repeated parameters of the same name. It seems to be a cleaner approach than inventing a sub-syntax inside of a query parameter to have a list. Instead, you introduce each repeatable parameter value with the name of the query parameter, i.e.

This has three different filters that may apply to the file extension, which is intermingled with other single parameters.

I have seen nowhere that it is forbidden or permitted to repeat parameters in a RAML URL, so I assume it is permitted. I do not want to have to invent list sub-syntaxes that get escaped in their own way.

But I would have expected to see an additional property of query parameters, like required, but called something like “repeatable”, so we distinguish whether a parameter may be repeated. If required is important, then repeatable should be as well.


Apologies, repeat is in the spec. I must have been looking in the wrong place.


Yes repeat: true is there in the specification :slight_smile:


Just to clarify repeat is indeed inside the RAML 0.8 specification but has been removed in RAML 1.0 in favour for RAML data types plus arrays.


Thus in RAML 1.0 how can we express a repeatable query parameter of type number in a specified format?

with repeat it would have been easy

    type: number
    format: long
    repeat: true

but this is not valid anymore in RAML 1.0.

Using type: number[] is far less expressive and leads to a documentation expressing a datatype array (different than repeatable for me)

Using an own defined type LongQueryParam could serve to express the long datatype but is far too complicated and does not render even in default viewer

    type: number
    format: long
        type: LongQueryParam[]