Comments (13)
WireMock.Net.StandAlone
There should be no need for Newtonsoft.Json; I did fix the app.config
from wiremock.net.
Static Mappings using a json file is not yet implemented. I'll build this in some time using this thread for updates.
from wiremock.net.
Support added.
See example project on how to use this.
from wiremock.net.
from wiremock.net.
Did you have time to verify this?
from wiremock.net.
@phillee007 Is it working fine?
from wiremock.net.
finally got a chance to test this!
To answer your question: yes and no...
Yes it can read mappings files that are named using a guid, however, we find it useful to actually use meaningful file names, as we're generating a whole heap of static mappings based on log files from real requests/responses from our external api. E.g. customer_get_123.json vs asdfdsafsaf234324.json
Is it possible for the static mappings reader to just read all .json files in the directory rather than forcing them to use a guid? Maybe add an optional filename property to the Mapping class so we can specify that if/when calling the admin api to add mappings at runtime too?
Thanks,
Phil
from wiremock.net.
Good point.
I will add support for all .json
files and add a title
to the mapping which will be used as filename if present.
from wiremock.net.
OK. I've added a "Title" as property. Can you please get the latest code and test if this works for you ?
from wiremock.net.
Were you able to test the latest code?
from wiremock.net.
Good news - I got to test this at last and it does work! Will raise another issue regarding the path matching and full urls separately
from wiremock.net.
Actually, scratch that comment re raising another issue. I see you've already added in the extra function to convert a relative url to the fully qualified url so that matcher works :-)
E.g. If the request has something like this:
...
Url": {
"Matchers": [
{
"Name": "WildcardMatcher",
"Pattern": "products/123456"
}
]
},
...
When I was using the earlier version of wiremock.net, it required me to have the fully-qualified url in the Pattern otherwise it wouldn't find the match when I requested http://myserver:9090/products/123456. E.g.
...
"Pattern": "http://myserver:9090/products/123456"
...
However, I see now that I can just specify the relative url and it works as per the regular WireMock documentation.
Great work!!! We're now ready to use this fairly heavily so will let you know if we hit any other issues
from wiremock.net.
Thanks. Please open new issues in case you encounter something.
from wiremock.net.
Related Issues (20)
- How does WithBody work with request matchers? HOT 5
- Save proxied requests during an XUnit integration test? HOT 7
- Wiremock.net (C#) how to get a PDF from a Request body (form-data ) HOT 2
- External Mapping Storage HOT 21
- Dynamic http status code? HOT 4
- Split WireMock into multiple nuget packages depending on features HOT 5
- Proxying always goes to the root HOT 1
- FluentAssertions extensions do not filter headers correctly HOT 2
- FluentAssertions extensions are not open for extension HOT 2
- Support for multipart formdata in RequestMessage HOT 8
- ProtoBufMatcher not working when proto package name contains dots HOT 2
- ProtoBufMatcher import in proto not working HOT 4
- Use mocked response data in Webhook body data HOT 3
- Compilation Error due to 'MessageOptions' Type Conflict between 'Google.Protobuf' and 'WireMock.Net' HOT 3
- FluentAssertions - Actual body is not displayed in error message when using Json Body HOT 6
- Did the ThrowExceptionWhenMatcherFails option got removed from 1.5.16 to 1.5.51? HOT 4
- Regex support for JsonMatcher HOT 10
- Wiremock not working with NUnit3 in .Net Framework 4.6.1 after Wiremock 1.5.47 HOT 3
- Feature: support multipart body in `IRequestMessage` HOT 6
- FindLogEntries present in WireMockServer but not IWireMockServer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiremock.net.