Response depending on securedBy

Hello,

I am designing an API where one of our requirements is that a GET/item/{item_id} returns a more complete object if an API key is used.
For example:

Unauthenticated GET

{
  name: John
}

Authenticated GET

{
  name: John,
  food: pizza
}

I havenโ€™t found a way to declare this in RAML, is it perhaps against best practices? or how would you write this behavior?

Check-out the Union Type, it does what you need.

Thanks @jstoiko Together with

securedBy: [ null, simple_token ]

allowed me to do exactly what I wanted :slight_smile: