Skip to content

Commit 57afe15

Browse files
Leeyoungonepetermetz
authored andcommitted
docs: fix naming - use API Client isntead of SDK
Fixes #1138 Signed-off-by: Youngone Lee <[email protected]>
1 parent a96ce68 commit 57afe15

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

CONTRIBUTING.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- [Debugging a test case](#debugging-a-test-case)
1818
- [All-In-One Docker Images for Ledger Connector Plugins](#all-in-one-docker-images-for-ledger-connector-plugins)
1919
- [Test Automation of Ledger Plugins](#test-automation-of-ledger-plugins)
20-
- [Building the SDK](#building-the-sdk)
20+
- [Building the API Client(S)](#building-the-api-clients)
2121
- [Adding new dependencies:](#adding-new-dependencies)
2222
- [Reload VSCode Window After Adding Dependencies](#reload-vscode-window-after-adding-dependencies)
2323
- [On Reproducible Builds](#on-reproducible-builds)
@@ -496,19 +496,21 @@ npx tap --ts --jobs=1 --timeout=600 \"./\"
496496
> Be aware that glob patterns need quoting in some operating system's shell environments and not necessarily on others.
497497
> In the npm scripts Cactus uses we quote all of them to ensure a wider shell compatibility.
498498

499-
### Building the SDK
499+
### Building the API Client(S)
500500

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
502502
compiled. It is all part of the `npm run build:dev:backend` task which you can run yourself
503503
or as part of the CI script (`./tools/ci.sh`).
504504

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.
507507
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
509511
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%).
513+
512514
513515
### Adding new dependencies:
514516

whitepaper/whitepaper.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Photo by Pontus Wellgraf on Unsplash
101101
- [5.4.1.1.2 Configuration Schema - API Server](#54112-configuration-schema---api-server)
102102
- [5.4.1.1.3 Plugin Loading/Validation](#54113-plugin-loadingvalidation)
103103
- [5.4.1.2 core-api](#5412-core-api)
104-
- [5.4.1.3 sdk](#5413-sdk)
104+
- [5.4.1.3 API Client](#5413-api-client)
105105
- [5.4.1.4 keychain](#5414-keychain)
106106
- [5.4.1.5 tracing](#5415-tracing)
107107
- [5.4.1.6 audit](#5416-audit)
@@ -1112,7 +1112,6 @@ All packages have a prefix of `cactus-*` to avoid potential naming conflicts wit
11121112

11131113
Naming conventions for packages:
11141114
* 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.
11161115
* All other packages should be named preferably as a single English word suggesting the most important feature/responsibility of the package itself.
11171116

11181117
#### 5.4.1.1 cmd-api-server
@@ -1235,9 +1234,9 @@ Plugin loading happens through NodeJS's built-in module loader and the validatio
12351234
Contains interface definitions for the plugin architecture and other system level components that are to be shared among many other packages.
12361235
`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.
12371236
1238-
#### 5.4.1.3 sdk
1237+
#### 5.4.1.3 API Client
12391238
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`.
12411240
Compatible with both NodeJS and Web Browser (HTML 5 DOM + ES6) environments.
12421241
12431242
#### 5.4.1.4 keychain
@@ -1512,10 +1511,10 @@ seen below:
15121511
}
15131512
```
15141513
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
15161515
consortium JWS that looks similar to what is pasted below.
15171516
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
15191518
`./packages/cactus-cockpit/src/app/consortium-inspector/consortium-inspector.page.ts`
15201519
15211520
```json

0 commit comments

Comments
 (0)