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
Copy file name to clipboardExpand all lines: apps/docs/docs/guides/integrations/switching-integrations.md
+22-21Lines changed: 22 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,25 @@ sidebar_position: 100
4
4
5
5
# Switching integrations
6
6
7
-
An integral feature of O2S are the integrations, therefore a mechanism for replacing one integration with another also had to be in place.
7
+
An integral feature of O2S are the integrations, therefore, a mechanism for replacing one integration with another also had to be in place.
8
8
9
-
Switching between integrations is a process that is not done often - it usually happens during the initial project configuration - but still our aim was for it to be relatively easy. It happens entirely within the API Harmonization server - so inside the `api-harmonization` application.
9
+
Switching between integrations is a process that is not done often - it usually happens during the initial project configuration - but still our aim was for it to be relatively easy. It happens entirely within the configuration, inside the `@o2s/configs.integrations` package that is shared across other apps.
10
10
11
11
:::note
12
12
Thanks to the normalized data model, replacing an integration is completely transparent to the frontend application.
13
13
:::
14
14
15
15
## Integration config
16
16
17
-
Inside the `apps/api-harmonization/models` there are a number of files that represent all the framework modules of the `@o2s/framework` package. Inside each of them are local exports that define which integration is used for that module.
17
+
Inside the `packages/configs/integrations/src/models` there are a number of files that represent all the framework modules of the `@o2s/framework` package. Inside each of them are local exports that define which integration is used for that module.
18
18
19
-
For example the `apps/api-harmonization/models/cms.ts` file that is pre-configured with a [mocked integration](../../integrations/mocked/mocked.md) looks like this:
19
+
For example, the `packages/configs/integrations/src/models/cms.ts` file that is pre-configured with a [mocked integration](../../integrations/mocked/mocked.md) looks like this:
20
20
21
21
```typescript title="integration config for the cms module"
@@ -34,32 +35,32 @@ These files export four things:
34
35
1. Integration config, that is then propagated to the framework modules to let them know what implementation to actually use. This is done via the `apps/api-harmonization/app.config.ts` file that does not have to be modified at all when switching integrations.
35
36
2. A service, that is used in other blocks and modules:
36
37
37
-
```typescript title="usage of CMS.Service within ticket-list.service.ts"
38
-
import { CMS, Tickets} from'../../models';
38
+
```typescript title="usage of services within page.service.ts"
0 commit comments