https://github.com/fredimachado/aspire.hosting.wiremock
API mocking support for .NET Aspire using WireMock.Net
https://github.com/fredimachado/aspire.hosting.wiremock
api aspire aspire-hosting dotnet mock wiremock wiremock-net
Last synced: 5 months ago
JSON representation
API mocking support for .NET Aspire using WireMock.Net
- Host: GitHub
- URL: https://github.com/fredimachado/aspire.hosting.wiremock
- Owner: fredimachado
- License: mit
- Created: 2024-05-28T09:40:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-10T09:24:06.000Z (7 months ago)
- Last Synced: 2025-05-02T14:09:30.313Z (6 months ago)
- Topics: api, aspire, aspire-hosting, dotnet, mock, wiremock, wiremock-net
- Language: C#
- Homepage:
- Size: 138 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aspire.Hosting.WireMock 
Aspire.Hosting.WireMock adds API mocking support for [.NET Aspire](https://github.com/dotnet/aspire) using WireMock.Net.
This project was created to make it easier to mock external APIs that are out of our control.
## Installing the Aspire.Hosting.WireMock NuGet package
[](https://www.nuget.org/packages/Fredi.Aspire.Hosting.WireMock)
Install the `Fredi.Aspire.Hosting.WireMock` package into your Aspire App Host project, e.g. using the `dotnet` command line in the project directory:
```shell
dotnet add package Fredi.Aspire.Hosting.WireMock
```Note: I couldn't push `Aspire.Hosting.WireMock` to NuGet because the `Aspire` package ID prefix is reserved.
## How to use
Please check the [sample project](./samples/MockWeatherForecast).
## Open WireMock Inspector Command

**Note:** Requires installation of the [WireMockInspector](https://github.com/WireMock-Net/WireMockInspector) tool.
```
dotnet tool install WireMockInspector --global --no-cache --ignore-failed-sources
```## License
Aspire.Hosting.WireMock is licensed under the [MIT License](./LICENSE).
## Contributing
Feel free to contribute to Aspire.Hosting.WireMock. Please [log an issue](https://github.com/fredimachado/Aspire.Hosting.WireMock/issues/new) to discuss your contribution before submitting a pull request.