Mocking Service walkthrough


#1

The content of this thread was moved to: http://blog.raml.org/mocking-service-walkthrough/

I hope you find it nicer to read there. You can keep replying here, or through the comments on the blog post itself.

Please, feel free to contact me directly if needed.


#2

Hi Norberto, this looks great. Is it possible to return the error payload from a mock in a different format. E.g.
{
“type”:“Duplicate widget”,
“code”:“WIDGET-001”,
“description”:“A widget of this type already exists”
}

Steve


#3

I don’t completely get what you are trying to do:
a. Override an http error code: I’ve tried this and found that it’s always returning the default validation errors.
b. Make responses depending on parameters (like working with “when” on mocking frameworks): This is more complex. Since the RAML spec is not intended to write mocks, it doesn’t provide a way to describe this. It could be a feature to add to the mocking service by using some kind of metadata taken from other place.

For both cases, I’ve already opened the discussion with the teams and will keep you updated.

Cheers!