-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Mockaco in an ASP.NET Core app #88
Comments
Yes, that's the idea @natenho, let me share it today with you via PR. |
Hi @gomete, I finally could check out and merge your PR! I had to do some adjustments and to tackle with some conflicts but it seems everything is OK now! The new nuget package is already available at https://www.nuget.org/packages/Mockaco.AspNetCore Thanks again for the feature and for your patience. |
Hi there,
I have been checking Mockaco to mock HTTP requests and I love how it works and how templating is conceived but it would be nice to extend it using the ASP.NET capabilities. Have you ever considered dividing Mockaco in the current dotnet tool and a package that can be used in an ASP.NET Core app in a similar way YARP did it?
Some of the advantages:
I did a quick probe of concept and it is almost prepared (as it is using middlewares and the built-in dependency injection) to use it this way and it can be reused in the dotnet tool. If you are interested I can do the changes in a fork and submit a PR to discuss it.
So it could be used (in a similar way to YARP), registering the services and configuration:
And then mapping the mock endpoints with the
IApplicationBuilder
:Without any customization in the pipeline:
Customizing the pipeline:
The text was updated successfully, but these errors were encountered: