Scytl / freddie

Front end development server
MIT License
4 stars 1 forks source link

Mock url with wildcards #5

Open pfraces opened 10 years ago

pfraces commented 10 years ago

(from @ansonete issue to pfraces/freddie)

An interesting part of mocking is to have just one example of resource and not to have to simulate the whole content (for this already is the backend).

So urls like /resource/:id/child would be awesome to mock this :id, so it always returns the same resource.

A suggestion would be to just map how it is now, url: file_path using "*".

The map would be very explicit like "api/source/*/child_source" : "mocks/source.json"