natenho / Mockaco

🐵 HTTP mock server, useful to stub services and simulate dynamic API responses, leveraging ASP.NET Core features, built-in fake data generation and pure C# scripting
https://natenho.github.io/Mockaco/
Other
336 stars 39 forks source link

Question about features #112

Closed ghost closed 1 year ago

ghost commented 1 year ago

Prerequisites

Description

Thanks first for this useful library.

Not sure if this is the correct section, but I didn't found answers in the steps of the readme or other opened issue. Can I have multiple request in a one file? I tried a GET and after that a POST, the result, only the POST was token into account.

Proposed solution

N/A

Alternatives

Created different files, each one with a different action.

Additional context

No response

natenho commented 1 year ago

Hi @dtrujillo-buildinglink , no, the current implementation expects just one template mock per file (so if you need to mock a GET and a POST, they should be put in different files)

However, I'm interested on your use case: Why would it be better to have everything on the same file?

ghost commented 1 year ago

Hi @dtrujillo-buildinglink , no, the current implementation expects just one template mock per file (so if you need to mock a GET and a POST, they should be put in different files)

However, I'm interested on your use case: Why would it be better to have everything on the same file?

Thanks for response @natenho, yes I proceeded creating a separate file per action. I though in grouping and ease to write, but, using that approach we would lost the single responsibility having all in a single file.