smollweide / node-mock-server

File based Node REST API mock server
MIT License
255 stars 65 forks source link

Placeholder at uri first level #36

Closed anabella-spinelli-olx closed 7 years ago

anabella-spinelli-olx commented 7 years ago

Hi! Thank you for this awesome tool :)

I'm trying to build a mock server where the first part of the uri path (what would be the "group" directory in the folder structure) is a dynamic path param. Something like: localhost:3001/{apiVersion}/somethingElse.

I changed the default urlPath to '' and then placed a directory named #apiVersion under rest. But that didn't work. I also tried using a group directory called # and in it the #apiVersion one, and finally tried putting the dynamic path param in the default urlPath, but that didn't work either.

Is it possible to do this? Can you help me out see what I'm missing?

Thank you again!

yael-lorenzo commented 7 years ago

+1

smollweide commented 7 years ago

Hi @anabella-spinelli-olx, thanks for reporting this issue. It's fixed with a7ab599.

Run npm install node-mock-server@0.15.1