Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Commit a8667a6

Browse files
committed
Update documentation
1 parent 6c7e79c commit a8667a6

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,30 @@ This is __very useful when running acceptance tests, as you can change the behav
1515

1616
This plugin is included in the [main distribution of the Mocks Server project][main-distribution-url], so you can refer to the [official documentation website][website-url].
1717

18+
## Options
19+
20+
* `adminApiPath` - Base path for the administration api. Default is "/admin". You should change it only if there is any conflict with the api you are mocking.
21+
* `adminApiDeprecatedPaths` - Boolean option, disables deprecated "/mocks" api path, which is still enabled by default.
22+
23+
Read more about [how to define options for the mocks-server plugins here](https://www.mocks-server.org/docs/configuration-options).
24+
1825
## API Resources
1926

2027
Available api resources are:
2128

22-
* `GET` `/mocks/behaviors/current` Returns current behavior.
23-
* `PUT` `/mocks/behaviors/current` Set current behavior.
24-
* Request body example: `{ "name": "behavior-name" }`
25-
* `GET` `/mocks/settings` Returns current server settings.
26-
* Response body example: `{ "delay": 0 }`
27-
* `PUT` `/mocks/settings` Changes current server settings.
29+
* `GET` `/admin/about` Returns plugin information.
30+
* Response body example: `{ "version": "1.2.0" }`
31+
* `GET` `/admin/behaviors` Returns behaviors collection.
32+
* `GET` `/admin/behaviors/:name` Returns an specific behavior.
33+
* `GET` `/admin/fixtures` Returns fixtures collection.
34+
* `GET` `/admin/fixtures/:id` Returns an specific fixture.
35+
* `GET` `/admin/settings` Returns current server settings.
36+
* Response body example: `{ "delay": 0, behavior: "foo-behavior", path: "mocks" }`
37+
* `PATCH` `/admin/settings` Changes current server settings.
2838
* Request body example: `{ "delay": 3000 }`
2939

40+
> Deprecated api resources under "/mocks" api path are still available.
41+
3042
## Contributing
3143

3244
Contributors are welcome.

0 commit comments

Comments
 (0)