feat: allow using mockaco on aspnet core apps #89
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #88
Hi @natenho!
These are the changes that I did to use Mockaco in an ASP.NET Core app:
Mockaco.AspNetCore
with the main logic, extracting the dependency injection and configuration of endpoints..MapGet
to avoid the conditionalMapWhen
and avoid making it public, so it is not part of the API of the package.Microsoft.CodeAnalysis.PublicApiAnalyzers
so it is easy to identify which parts of the package are public and to detect breaking changes.Microsoft.CodeAnalysis.CSharp.Scripting
.Mockaco
. We have added some Postman tests to ensure that at least the examples are still working as expected. The Postman teststest/_postman/Mockaco.postman_collection.json
and the scriptcheckBuild.ps1
can be removed once you tested the change. We only used them to ensure that the build, the unit tests and the Docker build will work.MapGet
to the existing ASP.NET Core using Mockaco to check that it is using the controller/MapGet
instead of using Mockaco. In case there is no match in the existing controllers, it is handled by Mockaco.