Open felipetofoli opened 7 months ago
Thank you, @felipetofoli, for the detailed information! I wished each bug report were like this 👍
A workaround is to place the CSV data in an external file.
This is a confirmed bug. The fix will be included in the upcoming version 1.12 along with a few others queued up for a release ("Cyrillic characters in a template may cause incorrect response output", "fixed log4j2 config for API Recorder", "upgraded Netty to fix a vulnerability in the HTTP/2 protocol known as "HTTP/2 Rapid Reset""...).
Thanks!
@apisim Thank you for the response! I will try the workaround while I wait for the fix!
Thanks!
Hi! First of all, APISimulator is a very interesting project and I am checking its features to see if I can integrate it into a new project that I am part of!
Issue
I am having an issue when using the CSV data provided in the simlet's YAML configuration: I can't match/retrieve the first (data) line of the CSV. It seems the first data line is ignored when matching the results.
Steps to reproduce
services: csv-apisimulator: container_name: "csv-apisimulator" image: apimastery/apisimulator:1.11 ports:
"./templates/csv:/templates" entrypoint: [ "bash", "-c", "apisimulator start ../../templates"]
... other containers definitions ...
templates/csv/apisim.yaml
looks like the following:Run
docker-compose
command:Call the endpoint:
4.1. Checking for the product in the first line - Result: 404 Not Found
curl:
HTTP Request and Response
4.2 Checking for the product in the second line - Result: 200 OK curl:
HTTP Request and Response:
Observation
If I change the places of the "S" product to the second line, and the "M" product to the first line, then the "M" (medium) product is the one that is not matched:
So, the behavior seems tied to the first data line of the csv configuration.
Logs
Please let me know if any other information is needed! Thanks!