You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 28, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,18 +15,30 @@ This is __very useful when running acceptance tests, as you can change the behav
15
15
16
16
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].
17
17
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
+
18
25
## API Resources
19
26
20
27
Available api resources are:
21
28
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.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
6
+
7
+
http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
10
+
*/
11
+
12
+
"use strict";
13
+
14
+
constexpress=require("express");
15
+
16
+
const{PLUGIN_NAME}=require("./constants");
17
+
const{ version }=require("../package.json");
18
+
19
+
classAboutApi{
20
+
constructor(core){
21
+
this._core=core;
22
+
this._tracer=core.tracer;
23
+
this._fixtures=this._core.fixtures;
24
+
this._router=express.Router();
25
+
this._router.get("/",this.getAbout.bind(this));
26
+
}
27
+
28
+
getAbout(req,res){
29
+
this._tracer.verbose(`${PLUGIN_NAME}: Sending about | ${req.id}`);
0 commit comments