Skip to content

Commit 2137574

Browse files
authored
5.3.2 release (#69)
1 parent 44c27e5 commit 2137574

43 files changed

Lines changed: 3634 additions & 3210 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ The Example app has the same source code as the standard API Hub. [The Example a
2424
- [Auto-detect the API Hub URL](./packages/example/README.md##auto-detect-the-api-hub-url)
2525
- [Customization Tutorials](./packages/example/README.md##customization-tutorials)
2626

27-
### Healthcare App
27+
### Healthcare App [Deprecated]
28+
29+
> **_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.
2830
2931
[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.
3032

@@ -33,7 +35,9 @@ The Healthcare app README includes the following information:
3335
- [Available users](./packages/healthcare/README.md##available-users)
3436
- [Customize the Healthcare app](./packages/layer7-apihub-mock/README.md##customize-the-healthcare-app)
3537

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.
3741
3842
[The Layer7 API Hub mock server README](./packages/layer7-apihub-mock/README.md) includes the following information:
3943

@@ -54,6 +58,7 @@ Use the following commands to set up you local development environment.
5458
**Prerequisites:**
5559

5660
Before setting up your local development environment, ensure that you have completed the following:
61+
5762
- You have installed [Yarn](https://yarnpkg.com/).
5863
- You have installed GNU Make 3.81 or later.
5964
- You have installed Node v12.20.2.
@@ -65,6 +70,7 @@ Install the JavaScript dependencies by issuing the following command:
6570
```sh
6671
make install
6772
```
73+
6874
### Start an App
6975

7076
Start the Example app or the Healthcare app in watch mode.
@@ -85,29 +91,29 @@ make start-healthcare
8591

8692
Run the unit tests and the E2E tests by issuing the following command:
8793

88-
```
94+
```
8995
make test
9096
```
9197

9298
#### Unit Tests
9399

94100
Run only the unit tests by issuing the following command:
95101

96-
``` sh
102+
```sh
97103
make test-unit
98104
```
99105

100106
#### End-To-End Tests
101107

102108
Run only the E2E tests:
103109

104-
``` sh
110+
```sh
105111
make test-e2e
106112
```
107113

108114
Open the E2E tests GUI (useful for writing and debugging E2E tests):
109115

110-
``` sh
116+
```sh
111117
make test-e2e-local
112118
```
113119

@@ -136,6 +142,7 @@ Follow these steps:
136142
```sh
137143
$ cd packages && yarn create react-app my-own-apihub --scripts-version=3.2.0
138144
```
145+
139146
2. Add the `layer7-aphub`, `layer7-apihub-mock`, and `react-admin` packages as dependencies in the new package.json:
140147

141148
```
@@ -147,15 +154,17 @@ $ cd packages && yarn create react-app my-own-apihub --scripts-version=3.2.0
147154
"react-admin": "~3.6.2",
148155
"react-scripts": "~3.2.0"
149156
},
150-
```
157+
```
151158

152159
3. Copy the config files to the `example` package by issuing the following commands:
160+
153161
```sh
154162
$ cp -r packages/example/config packages/my-own-apihub/config/
155163
$ cp packages/my-own-apihub/config/config-dev.js packages/my-own-apihub/public/config.js
156164
```
157165

158166
4. Update the public `index.html` file to include the `config.js` file:
167+
159168
```html
160169
<!-- in packages/my-own-apihub/public/index.html -->
161170
<head>
@@ -166,6 +175,7 @@ $ cp packages/my-own-apihub/config/config-dev.js packages/my-own-apihub/public/c
166175
```
167176

168177
5. Include the base API Hub component in the `App.js` file:
178+
169179
```js
170180
// in packages/my-own-apihub/src/App.js
171181
import { ApiHubAdmin } from 'layer7-apihub';
@@ -182,6 +192,7 @@ const App = () => {
182192
```
183193

184194
6. Add the mock server to the `index.js` file
195+
185196
```js
186197
// in packages/my-own-apihub/src/index.js
187198
import { startApiHubMockedServer } from 'layer7-apihub-mock';
@@ -200,6 +211,7 @@ if (!shouldEnableMock(ENABLE_MOCK)) {
200211
```
201212

202213
7. Start the bare-bones my-own-apihub app by issuing the following commands:
214+
203215
```
204216
$ cd packages/my-own-apihub
205217
$ yarn install

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
"es-abstract": "~1.19.0",
4747
"elliptic": "~6.5.7",
4848
"get-intrinsic": "~1.1.3",
49-
"serialize-javascript": "~3.1.0",
49+
"serialize-javascript": "~6.0.2",
5050
"qs": "6.9.7",
5151
"rehype-ignore": "1.0.1",
5252
"ua-parser-js": "0.7.35",
5353
"url-parse": "^1.5.9",
5454
"fast-json-patch": "3.1.1",
5555
"yaml": "2.0.0-1"
5656
}
57-
}
57+
}

packages/example/src/TestPage.js

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function TestPage() {
4242
<h2>ApiEula</h2>
4343
<p
4444
dangerouslySetInnerHTML={{
45-
__html: apiEula ? apiEula.Content : null,
45+
__html: apiEula ? apiEula.content : null,
4646
}}
4747
/>
4848
</>

packages/example/src/ui/Footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const Footer = () => {
1313
variant="body2"
1414
className={classes.copyright}
1515
>
16-
Copyright © 2024 Broadcom. All Rights Reserved
16+
Copyright © 2025 Broadcom. All Rights Reserved
1717
</Typography>
1818
)}
1919
</div>

packages/healthcare/README.md

100755100644
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Healthcare App
1+
# Healthcare App [Deprecated]
2+
3+
> **_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.
24
35
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.
46

@@ -9,28 +11,29 @@ The Healthcare app is built on top of [Create React App (CRA)](https://create-re
911
The following user roles are available in this app:
1012

1113
- Portal Admin
14+
1215
- login: `portalAdmin`
1316
- password: `Password@1`
14-
1517
- API Owner
18+
1619
- login: `apiOwner`
1720
- password: `Password@1`
18-
1921
- Org Publisher
2022
- login: `orgPublisher`
2123
- password: `Password@1`
22-
2324
- Org Admin
25+
2426
- login: `Publisher`
2527
- password: `Password@1`
26-
2728
- Developer
29+
2830
- login: `user`
2931
- password: `Password@1`
3032

3133
## Customize the Healthcare App
3234

3335
The Healthcare App leverages the customization mechanisms provided by its underlying libraries:
36+
3437
- [MaterialUI](https://material-ui.com/customization/theming/)
3538
- [react-admin](https://marmelab.com/react-admin/Theming.html)
3639
- [Layer7 API Hub](../layer7-apihub/README.md)

packages/layer7-apihub-mock/README.md

100755100644
Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff 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.
24
35
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.
46

@@ -34,7 +36,7 @@ startApiHubMockedServer().then(() =>
3436

3537
The mock server creates a global `Layer7Mock` object. You can access the local database using this object in your browser's Developer Tool console:
3638

37-
``` js
39+
```js
3840
Layer7Mock.database // Returns the data base
3941
Layer7Mock.resetDatabase() // Delete then recreate the local database
4042
Layer7Mock.clearDatabase() // Delete the local database
@@ -67,30 +69,32 @@ startApiHubMockedServer({ showRunningIndicator: false }).then(() =>
6769
The following user roles are included with the mock server:
6870

6971
- Portal Admin
70-
- login: `portalAdmin`
71-
- password: `Password@1`
72-
72+
73+
- login: `portalAdmin`
74+
- password: `Password@1`
7375
- 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`
8891

8992
You can change these user roles by [providing your own Data](#provide-your-own-data).
9093

9194
## Customize the Mock Server
9295

9396
You can customize the mock server by adding API routes and entities. The `startApiHubMockedServer()` function returns an object that includes the following keys:
97+
9498
- `server`. This key is the MirageJS server instance. You can add API routes using this server instance.
9599
- `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.
96100

@@ -170,7 +174,7 @@ For more information about these PAPI objects, see [the Layer7 API Developer Por
170174

171175
To generate new data, run the following command which accepts an output file:
172176

173-
``` sh
177+
```sh
174178
./bin/generateData.js myOutputFile.json
175179
```
176180

0 commit comments

Comments
 (0)