You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm aware this not even valid YAML, but the file:/path/to/hello_world_response.json is just an example of what I'm trying to do, which is only to refer to a file with the content of the body, instead of putting the gigantic response there. If that's impossible to do these days, it would be nice to have a declarative way to implement such things in the YAML configuration file — probably with a fixed location for these kind of files.
Moreover, those are usually templates, because there is always something that needs to be changed before sending them back to the user-agents.
The text was updated successfully, but these errors were encountered:
We also deal with very big payloads, and we usually just put them in the body. The mock file ends up big, but Smocker handles it just fine :)
Sometimes when we don't want to deal with very big mocks we have 2 solutions:
write the whole body on a single line. If the mock is not intended to be modified or read, it's ok
remove the useless parts from the body, and keep only the keys we use (whether it's JSON or XML)
But keep in mind, a mock file with a very big body should not be an issue for Smocker.
We don't really want to implement a reference to a file for 2 reasons:
we want the mocks to be self contained as much as possible. It's easier to maintain, to understand, and it helps us keep Smocker's code relatively simple
referencing an external file has its issues: where does the file come from? is it already loaded on Smocker via the persistence folder? is it loaded via another endpoint? this is not trivial to specify nor to implement, so I'd rather not implement something like this.
I'm working with ancient APIs these days. The responses are JSON or XML files around 3,000 (even more) lines length.
I would like to use Smocker at the new work place, but so far I haven't found a way to do something like this with Smocker:
I'm aware this not even valid YAML, but the
file:/path/to/hello_world_response.json
is just an example of what I'm trying to do, which is only to refer to a file with the content of the body, instead of putting the gigantic response there. If that's impossible to do these days, it would be nice to have a declarative way to implement such things in the YAML configuration file — probably with a fixed location for these kind of files.The text was updated successfully, but these errors were encountered: