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
@@ -496,19 +496,21 @@ npx tap --ts --jobs=1 --timeout=600 \"./\"
496
496
> Be aware that glob patterns need quoting in some operating system's shell environments and not necessarily on others.
497
497
> In the npm scripts Cactus uses we quote all of them to ensure a wider shell compatibility.
498
498
499
-
### Building the SDK
499
+
### Building the API Client(S)
500
500
501
-
You do not need to do anything special to have the SDK sources generated and
501
+
You do not need to do anything special to have the API Client sources generated and
502
502
compiled. It is all part of the `npm run build:dev:backend` task which you can run yourself
503
503
or as part of the CI script (`./tools/ci.sh`).
504
504
505
-
The SDK is itself just another package named `sdk` and can be dependend on by
506
-
other packages where applicable.
505
+
The API client code is automatically generated from the respective `openapi.json` file of each package that exposes ay web serices (REST/SocketIO/gRPC/etc.) and can be dependend on by
506
+
other packages where applicable. There's a dedicated `@hyperledger/cactus-api-client` package that is meant to contain common functionality among the rest of API clients. The concept here is similar to abstract classes and their sub-class implementations.
507
507
508
-
The SDK is designed to be a universal package meaning that it runs just fine in
508
+
Each `openapi.json` produces its own API client via the code generator that also contains relevant model definitions, such as interfaces describing the request/response bodies of all possible operations and validation constraints as well.
509
+
510
+
The API clients are designed to be a universal components, meaning that it runs just fine in
509
511
browser and also NodeJS environments. This is very important as we do not wish
510
-
to maintain two (or more) separate SDK codebases and we also want as much of it
511
-
being generated automatically as possible (currently this is close to 100%).
512
+
to maintain two (or more) separate API client codebases for the various platforms and we also want as much of it being generated automatically as possible (currently this is close to 100%).
@@ -1112,7 +1112,6 @@ All packages have a prefix of `cactus-*` to avoid potential naming conflicts wit
1112
1112
1113
1113
Naming conventions for packages:
1114
1114
* cmd-* for packages that ship their own executable
1115
-
* sdk-* for packages designed to be used directly by application developers except for the Javacript SDK which is named just `sdk` for simplicity.
1116
1115
* All other packages should be named preferably as a single English word suggesting the most important feature/responsibility of the package itself.
1117
1116
1118
1117
#### 5.4.1.1 cmd-api-server
@@ -1235,9 +1234,9 @@ Plugin loading happens through NodeJS's built-in module loader and the validatio
1235
1234
Contains interface definitions for the plugin architecture and other system level components that are to be shared among many other packages.
1236
1235
`core-api` is intended to be a leaf package meaning that it shouldn't depend on other packages in order to make it safe for any and all packages to depend on `core-api` without having to deal with circular dependency issues.
1237
1236
1238
-
#### 5.4.1.3 sdk
1237
+
#### 5.4.1.3 API Client
1239
1238
1240
-
Javascript SDK (bindings) for the RESTful HTTP API provided by `cmd-api-server`.
1239
+
Javascript API Client (bindings) for the RESTful HTTP API provided by `cmd-api-server`.
1241
1240
Compatible with both NodeJS and Web Browser (HTML 5 DOM + ES6) environments.
1242
1241
1243
1242
#### 5.4.1.4 keychain
@@ -1512,10 +1511,10 @@ seen below:
1512
1511
}
1513
1512
```
1514
1513
1515
-
The configuration above will cause the `Consortium JWS` REST API endpoint (callable via the SDK) to respond with a
1514
+
The configuration above will cause the `Consortium JWS` REST API endpoint (callable via the API Client) to respond with a
1516
1515
consortium JWS that looks similar to what is pasted below.
1517
1516
1518
-
Code examples of how to use the SDK to call this endpoint can be seen at
1517
+
Code examples of how to use the API Client to call this endpoint can be seen at
0 commit comments