Git Product home page Git Product logo

uaimockserver's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

uaimockserver's Issues

Route not found when it has a slash in the end of context and in the beginning of the path

Hi!

I didn't take a look at the code yet, but I was having this problem when trying to call the route. I was using the version 1.2.4.

I leave a slash in the end of my context:
"context": "/web-app/api/",

And also in the beginning of the path from a request:
"path": "/customer/1234"

I'll try to send a PR at home later on.

PS: I edited the JSON file manually (I didn't use the GUI)

[BE][V] Create forward response

Create a forward response that will response with a header containing the destination (URL) and a HTTP status like 307 by default

[BE] Body Validation: By regex

Validate the body using a given regex

E.g.: /^([\w-]+(?:.[\w-]+))@((?:[\w-]+.)\w[\w-]{0,66}).([a-z]{2,6}(?:.[a-z]{2})?)$/i

Print the server path when starting

It would be nice to just print the server path in console when starting the server locally

also will be helpful to have a method getRootUrl() on the server instance when writing tests to get the configured route when starting/stopping the server, so we don't have to hardcode the path to the mock server in the tests.

[BE][V] Create a Default Route

A default route just in case if a request cannot be found, the default route will be displayed.

e.g.:

GET /uaiMockServer/doNotExists

response ---> 401 - blocked

[BE][V] Creating LIKE option

Make the validation if a header/queryParam/body/cookie contains a given text

e.g. "A B C D" should be true if the given text is "B"

Adjust backup config file

For every update in the uaiMockServer.json a backup file is created.

To avoid the creation of a lot of files, other backup options should be allowed:

  • do not back up
  • only 1 back up (will be overwritten at every update) - DEFAULT
  • a new file for every update (current)

SOAP support

I find this utility very useful, so thanks for sharing it with the world!

Often times our software depends on 3rd party SOAP services and so we need to mock their responses and test the behaviour with BDD. For the purpose we currently create whole SOAP server in php and return the responses we expect to be returned.

I have tried using this tool to achieve that, but it does not have a parameter for receiving BODY in the POST requests. In SOAP you may have multiple calls on the very same endpoint, so having the BODY in there is essential.

Would you please consider adding SOAP support or POST request BODY support?

[BE][V] Create the option of the route state

A route will have the following states:

  • persistente -> will be written in the config file [DEFAULT]
  • in_memory -> will run in memory only, after a reboot it will disappear
  • will_disappear_in -> will disappear after x requests

[V] Create add wildcard

Create a button that will add automatically the wild card inside the body/header/queryParam/cookie

refactor fe URL

wee need to update the old FE and update all the URLs. and also fix a bug that it was not selecting the menu.

Make Create backups of the config configurable

Right now i am getting a backup file every time i add a request or delete one.

It would be nice if this is configurable when starting the server so that we can turn it on or off.
I am using git to manage the config and i don't need the backups. it just creates too much files.

[Feature] Create a request holder

Create a configuration to hold a request for x time.

It should be something like:

request {
    path = "/holdTheRequest"
    method = "GET"
    holdTheRequestInMilli = 500
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.