August 18, 2019
We are excited to announce API Simulator version 1.4!
Here is the scoop:
- Added support for single configuration file for multiple simlets. It gives you a choice – place each simlet in separate directory as before or all simlets in a single configuration file. This can be very handy for smaller simulations.
- Shorter matcher configuration is now possible when the operation is `equals` for uriPath and uriPathPattern (example: “uriPath: /favicon.ico”).
- Added ability to use a placeholder or scriptlet to return dynamically the HTTP status code for a templated response. Before it was required to create a separate simlet if you wanted to return different status code along with different body based on some condition.
- Added new parameter – “parameter from file”. It makes it possible to mingle the content from a file with other fragments in the Simula template. Not only that but the actual source file can be determined at run-time, for example, by using values from the request.
- Added “list from file” parameter. The content of the file – one item per line – is treated as any other list parameter. This allows sharing lists like of first or last names without having to embed them in the simlet configuration.
- Added new parameter – “parameter from template”. It makes it possible to dynamically evaluate a template and use the resulting value in multiple places in the response.
- Made the executor configuration for parameters from script to default to the Groovy script executor if not explicitly configured.
- Fixed the type conversion for parameters from script when the value returned from the script isn’t a String.
- Fixed HTTP status code 503 to translate to “Service Unavailable” instead of “ServiceUnavailable” (without a space).
- Parameter from UriPathPattern used as a matcher doesn’t log an error anymore on mismatch.
- Not receiving data from the client within the read timeout when the connection is kept open because of keep-alive is not logged as an error anymore – it is now treated as a normal condition.
- Documented how to change the configuration for a response codec.
- Added to the docs example for Large File Download. API Simulator is capable of simulating file downloads, including files gigabytes in size while using only few megabytes of memory, and this example demonstrates that.
- Added the path to the simulation directory – sim.path – as a variable that can be used to specify file locations in simlet configurations.
- Unified the use of the sim.path and simlets.path variables, and ${sim.path} and ${simlets.path} placeholders in scripts and eval expressions.
- Updated and enhanced the documentation to reflect the changes listed above.
We invite you to learn more about API Simulator, download and install it, and run the examples included in the download. Why not even create API simulations to help your own testing and development?
Let us know what you think at [feedback at APISimulator.com]. Many thanks for your interest and support!
Happy API Simulating!