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)
- Is there a way to record API calls in the file format required for WireMock Testcontainers? HOT 1
- When using C# code generation WithBody() matcher is not generated for POST Request HOT 3
- GUIDs generated by WireMock.NET differ between instances when deployed to Azure with multiple instances. HOT 6
- Encoded url path parameter decoded via proxy
- Multiple Matchers MatchOperator HOT 5
- Should my URL be replaced with 'localhost' HOT 8
- WireMock standalone and Linqpad HOT 2
- Master branch doesn't build HOT 1
- C# Unit test: Wiremock Server runs but does not deliver response HOT 2
- Docs: Documentation is misleading/incomplete for BodyAsFile HOT 1
- Response Templating complex objects HOT 11
- Connection prematurely closed BEFORE response HOT 3
- Request Matching JsonPathMatcher Partially
- WireMock.Net.Client Request Builder Matchers HOT 8
- AbstractJsonPartialMatcher: Regex Value is Uppercased when IgnoreCase is set to true HOT 2
- Generating mappings from Payroc open-api file gives ArgumentException: Property with the same name already exists on object HOT 10
- Error in RequestMessageMultiPartMatcher HOT 3
- WireMock.Org.RestClient vs WireMock.Net.RestClient? HOT 1
- XML transformation HOT 7
- Request matching WithProbability strange behaviour
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.