Comments (4)
Created a pull request with a potential solution. #30
from node-mock-server.
Hi @crbanman,
I created an middleware object which gives you the power to change the response.
The difference to your approach is that there is a new option in the ui to select "middleware" as response.
Will this approach be okay for you?
from node-mock-server.
Hey @smollweide,
Your current solution does solve my problem.
It would be nice if each service could define their own middleware code inside the same directory as the other files for that service. But that's more of a "nice to have" feature as your current solution will work for me.
from node-mock-server.
Hi @crbanman,
it's released with in version 0.13.0
npm i [email protected] --save-dev
Thank you for your patience.
from node-mock-server.
Related Issues (20)
- 413 Error: request entity too large HOT 2
- Tunnels with https target HOT 3
- node-mock-server doesn't parse 'application/json' content type HOT 1
- Import Swagger doesn't parse $ref HOT 1
- react-dev-utils as "dependency" instead of "devDependency" HOT 1
- Swagger Import does not generate response schema
- CORS: Error during options request HOT 1
- How to handle xml response in mock-server HOT 2
- It doesnโt copy example responses from swagger HOT 2
- Docker support for node mock server HOT 1
- Switching between configured Responses HOT 1
- HTTP code does work with response header HOT 1
- Can someone help me deploy this on Azure or google cloud? HOT 1
- cors issue HOT 1
- How to mock image type GET responses? HOT 1
- UI freezes when refreshing after removing endpoint from filesystem
- Switching to middleware automatically HOT 1
- Doubt about func-imported when import swagger, error400, Collections and more
- How to mocking delay response HOT 1
- [question] options.accessControlAllowOrigin (and others) not send when using middleware
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 node-mock-server.