@pands/sdk-gen 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @pands/sdk-gen
|
|
2
|
+
|
|
3
|
+
> OpenAPI 3.1 merger and multi-platform client SDK code generator (TypeScript, Swift, Kotlin) for the **Pand Application Platform**.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@pands/sdk-gen)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
`@pands/sdk-gen` introspects microservice schemas, merges individual OpenAPI specifications into a unified schema, and generates strongly-typed client libraries for Web, iOS (SwiftUI), and Android (Jetpack Compose).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add @pands/sdk-gen
|
|
16
|
+
# or with npm:
|
|
17
|
+
npm install @pands/sdk-gen
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import {
|
|
26
|
+
generateTypeScriptSdk,
|
|
27
|
+
generateSwiftSdk,
|
|
28
|
+
generateKotlinSdk
|
|
29
|
+
} from "@pands/sdk-gen";
|
|
30
|
+
|
|
31
|
+
// Generate TypeScript client wrapper & types
|
|
32
|
+
await generateTypeScriptSdk({
|
|
33
|
+
openApiSpec: mergedSpec,
|
|
34
|
+
outDir: "./packages/sdk",
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Generate Swift client SDK
|
|
38
|
+
await generateSwiftSdk({
|
|
39
|
+
openApiSpec: mergedSpec,
|
|
40
|
+
outFile: "./apps/ios/Shared/PandSDK.swift",
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Generate Kotlin client SDK
|
|
44
|
+
await generateKotlinSdk({
|
|
45
|
+
openApiSpec: mergedSpec,
|
|
46
|
+
outFile: "./apps/android/app/src/main/java/dev/pand/sdk/PandSDK.kt",
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT © [Mehdi Nosrati](https://github.com/MehdiNosrati)
|