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
> **_Note:_** The Healthcare app is now deprecated. It will no longer be actively maintained and will not receive new features or updates, including bug fixes. This deprecation is part of our ongoing efforts to improve the repository and streamline functionality.
28
30
29
31
[The Healthcare app](./packages/healthcare/README.md) demonstrates a possible customized variation of API Hub with a Healthcare theme. It includes the same developer features as the Example app. It further extends the API Hub to include custom pages and additional calls (PAPI and Portal Metrics API). You use this app with the mock server.
30
32
@@ -33,7 +35,9 @@ The Healthcare app README includes the following information:
-[Customize the Healthcare app](./packages/layer7-apihub-mock/README.md##customize-the-healthcare-app)
35
37
36
-
### Layer7 API Hub Mock Server
38
+
### Layer7 API Hub Mock Server [Deprecated]
39
+
40
+
> **_Note:_** Layer7 API Hub Mock Server is now deprecated. It will no longer be actively maintained and will not receive new features or updates, including bug fixes. This deprecation is part of our ongoing efforts to improve the repository and streamline functionality.
37
41
38
42
[The Layer7 API Hub mock server README](./packages/layer7-apihub-mock/README.md) includes the following information:
39
43
@@ -54,6 +58,7 @@ Use the following commands to set up you local development environment.
54
58
**Prerequisites:**
55
59
56
60
Before setting up your local development environment, ensure that you have completed the following:
61
+
57
62
- You have installed [Yarn](https://yarnpkg.com/).
58
63
- You have installed GNU Make 3.81 or later.
59
64
- You have installed Node v12.20.2.
@@ -65,6 +70,7 @@ Install the JavaScript dependencies by issuing the following command:
65
70
```sh
66
71
make install
67
72
```
73
+
68
74
### Start an App
69
75
70
76
Start the Example app or the Healthcare app in watch mode.
@@ -85,29 +91,29 @@ make start-healthcare
85
91
86
92
Run the unit tests and the E2E tests by issuing the following command:
87
93
88
-
```
94
+
```
89
95
make test
90
96
```
91
97
92
98
#### Unit Tests
93
99
94
100
Run only the unit tests by issuing the following command:
95
101
96
-
```sh
102
+
```sh
97
103
make test-unit
98
104
```
99
105
100
106
#### End-To-End Tests
101
107
102
108
Run only the E2E tests:
103
109
104
-
```sh
110
+
```sh
105
111
make test-e2e
106
112
```
107
113
108
114
Open the E2E tests GUI (useful for writing and debugging E2E tests):
109
115
110
-
```sh
116
+
```sh
111
117
make test-e2e-local
112
118
```
113
119
@@ -136,6 +142,7 @@ Follow these steps:
136
142
```sh
137
143
$ cd packages && yarn create react-app my-own-apihub --scripts-version=3.2.0
138
144
```
145
+
139
146
2. Add the `layer7-aphub`, `layer7-apihub-mock`, and `react-admin` packages as dependencies in the new package.json:
> **_Note:_** The Healthcare app is now deprecated. It will no longer be actively maintained and will not receive new features or updates, including bug fixes. This deprecation is part of our ongoing efforts to improve the repository and streamline functionality.
2
4
3
5
The Healthcare app demonstrates a customization of [the Layer7 API Hub Library](../layer7-apihub/README.md). This app uses [the Layer7 API Hub mock server](../layer7-apihub-mock) as the backend server.
4
6
@@ -9,28 +11,29 @@ The Healthcare app is built on top of [Create React App (CRA)](https://create-re
9
11
The following user roles are available in this app:
10
12
11
13
- Portal Admin
14
+
12
15
- login: `portalAdmin`
13
16
- password: `Password@1`
14
-
15
17
- API Owner
18
+
16
19
- login: `apiOwner`
17
20
- password: `Password@1`
18
-
19
21
- Org Publisher
20
22
- login: `orgPublisher`
21
23
- password: `Password@1`
22
-
23
24
- Org Admin
25
+
24
26
- login: `Publisher`
25
27
- password: `Password@1`
26
-
27
28
- Developer
29
+
28
30
- login: `user`
29
31
- password: `Password@1`
30
32
31
33
## Customize the Healthcare App
32
34
33
35
The Healthcare App leverages the customization mechanisms provided by its underlying libraries:
Expand all lines: packages/layer7-apihub-mock/README.md
+24-20Lines changed: 24 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# Layer7 API Hub Mock Server Package
1
+
# Layer7 API Hub Mock Server Package [Deprecated]
2
+
3
+
> **_Note:_** Layer7 API Hub Mock Server is now deprecated. It will no longer be actively maintained and will not receive new features or updates, including bug fixes. This deprecation is part of our ongoing efforts to improve the repository and streamline functionality.
2
4
3
5
This package provides an API Hub mock server that intercepts calls to the Portal API (PAPI) and sends back a generated response. This mock server runs in a web browser.
The following user roles are included with the mock server:
68
70
69
71
- Portal Admin
70
-
- login: `portalAdmin`
71
-
- password: `Password@1`
72
-
72
+
73
+
- login: `portalAdmin`
74
+
- password: `Password@1`
73
75
- API Owner
74
-
- login: `apiOwner`
75
-
- password: `Password@1`
76
-
77
-
- Org Publisher
78
-
- login: `orgPublisher`
79
-
- password: `Password@1`
80
-
81
-
- Org Admin
82
-
- login: `Publisher`
83
-
- password: `Password@1`
84
-
85
-
- Developer
86
-
- login: `user`
87
-
- password: `Password@1`
76
+
77
+
- login: `apiOwner`
78
+
- password: `Password@1`
79
+
- Org Publisher
80
+
81
+
- login: `orgPublisher`
82
+
- password: `Password@1`
83
+
- Org Admin
84
+
85
+
- login: `Publisher`
86
+
- password: `Password@1`
87
+
- Developer
88
+
89
+
- login: `user`
90
+
- password: `Password@1`
88
91
89
92
You can change these user roles by [providing your own Data](#provide-your-own-data).
90
93
91
94
## Customize the Mock Server
92
95
93
96
You can customize the mock server by adding API routes and entities. The `startApiHubMockedServer()` function returns an object that includes the following keys:
97
+
94
98
-`server`. This key is the MirageJS server instance. You can add API routes using this server instance.
95
99
-`database`. This key is a [minimongo](https://github.com/mWater/minimongo) instance. You can add entities using this instance. These entities are persisted in an IndexedDb database.
96
100
@@ -170,7 +174,7 @@ For more information about these PAPI objects, see [the Layer7 API Developer Por
170
174
171
175
To generate new data, run the following command which accepts an output file:
0 commit comments