Skip to content

Commit ee7e14b

Browse files
committed
Added and updated diagrams for Digital Ocean and Code generation tool
1 parent 4cb137a commit ee7e14b

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed
0 Bytes
Loading
918 KB
Loading
36.4 MB
Loading
1.48 MB
Loading

generator/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ For the class-based SDKs there is a minor change in the `node-cloud.yml` to reco
8686

8787
```
8888
DO:
89-
create: droplets.d.ts create
89+
describeCluster: kubernetes.d.ts getById
9090
```
9191

92+
<p align="center">
93+
<img src="../assets/generator/high_level_diagrams/do.png" style="width:60%" />
94+
<img src="../assets/generator/high_level_diagrams/do_diagram.png" />
95+
</p>
9296

9397

9498
## Code parsers
@@ -125,5 +129,10 @@ The tool works in this flow:
125129
<img src="../assets/generator/high_level_diagrams/toolflow_diagram.png" />
126130
</p>
127131

132+
The entry point of nodecloud is the main.ts file which you provide to typescript to generate the js file and then run the same. Inside the main file we fetch services from YML file and one by one pass the SDK file path and service name to generator function.
133+
134+
Inside generator we first call the parser to get the needed class and extract functions, parameters,etc needed for building Nodecloud classes. All this data is then passed onto the
135+
transformer which transforms the dummy class into an working Nodecloud class for that specific service. All these classes are then written into the Js file.
136+
128137
## Running the code generation tool
129138
- To build classes run `tsc main && node main` or 'yarn run tool' if inside generator directory and `yarn run generator` if inside nodecloud directory.

0 commit comments

Comments
 (0)