Search code examples
muleraml

How to define a generic responce header parameter in RAML


I need to define a response header parameter that would be common for all the 2xx response codes in the RAML API.

I only found a way to define the parameter per each HTTP code like this:

 responses:
  200:
   headers:
    X-Transaction-Id:
      type: string

But I need to do something like this:

 responses:
      [200-300):
       headers:
        X-Transaction-Id:
          type: string

Any help pls?


Solution

  • Cannot do that. You need to declare each status code separately.