ianunay / mock-node

A configurable mock server with an intuitive configuration management interface and a http api
https://medium.com/@i.anunay/mocknode-e338f793dba0
170 stars 11 forks source link

RAML to config converter or config syntax specification #6

Open nwwells opened 8 years ago

nwwells commented 8 years ago

This project looks awesome! Are there any plans to offer a RAML -> config conversion? If not, is there a specification or documentation on the config syntax?

ianunay commented 8 years ago

Thanks,

The routes and dynamic stub configuration of a route are in the config.json file in the repo root, the stubs themselves are in the stubs/ folder. I will write a wiki explaining more about the configuration.

My hypothesis is that, it is easy to use the client interface at /mocknode to configure the server as this removes the need to restart the server on config changes.

Is there a reason that you choose to change the config.json files manually? Is it because , you have to add a lot of configuration and you find the process tedious?

nwwells commented 8 years ago

Our API server documents it's interface in RAML, one of many ways to document a REST interface in a parseable way. My thought was to convert the RAML into the config file to give a starting point and then to build more config in the UI as necessary. On Thu, Jun 2, 2016 at 10:50 Anunay Inuganti notifications@github.com wrote:

Thanks,

The routes and dynamic stub configuration of a route are in the config.json file in the repo root, the stubs themselves are in the stubs/ folder. I will write a wiki explaining more about the configuration.

My hypothesis is that, it is easy to use the client interface at /mocknode to configure the server as this removes the need to restart the server on config changes.

Is there a reason that you choose to change the config.json files manually? Is it because , you have to add a lot of configuration and you find the process tedious?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ianunay/mock-node/issues/6#issuecomment-223315850, or mute the thread https://github.com/notifications/unsubscribe/AA_ccefp1dYrKyGBCQ2hzw5hb80beiCRks5qHu20gaJpZM4Isj3Q .

ianunay commented 8 years ago

Ok, I will document the config as soon as I find some time.

Below are the places where the entire config is stored:

config.json

stubs folder