clj-wiremock's People
clj-wiremock's Issues
Add syntactic sugar for scenarios
Update to latest wiremock
Please update to latest wiremock to avoid jetty incompatibility issue
Document stub syntactic sugar
Pass on any fields in `opts` stub data through as is to wiremock
To allow leverage of wiremock features not supported directly in the clj-wiremock syntactic sugar, allow the user to specify raw JSON from the official wiremock API. This should be possible by just passing through any unrecognised opts
on the :req
and :res
stub fields "as is" to the underlying wiremock JSON API. Something like:
(with-stubs [{:req [:GET "/ping"] :res [200 {:bodyFileName: "path/to/myfile"}] :priority 1}]
...)
Add support for a "times" syntax
Sometimes the scenario syntax and concepts are overcomplex when all one wants to do is match a stub against X number of identical requests and THEN respond to all subsequent requests with a different response.
To do this we can piggy-back on the scenario concept though. So something like
(wmk/with-stubs [{:req [:GET "/ping"] :res [200] :times 2} {:req [:GET "/ping"] :res [503 {:body "Too many pings."}]}])
would be the equivalent of:
(wmk/with-stubs [{:req [:GET "/ping"] :res [200] :state {:new "state1"}}
{:req [:GET "/ping"] :res [200] :state {:required "state1" :new "state2"}}
{:req [:GET "/ping"] :res [503 {:body "Too many pings."}] :state {:required "state2"}}])
Add support for matching URL regexs
Doesn't work with latest version of WireMock
Hey! Love the library.
I've kept various jetty dependencies pinned at 9.4.48.v20220622
because of compatibility issues with wiremock. I'm trying to update to latest ring (and thus jetty), which has required updating wiremock to latest as well (jackson compatibility). This works fine except that the stub registration url is now "/mappings"
, not "/mappings/new"
. This can be patched by copy-pasting the WireMockServer
defrecord into my project and making the necessary changes, but seems worthwhile to update here directly.
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.