@techspokes/typescript-wsdl-client 0.9.0 → 0.9.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/LICENSE +21 -21
- package/README.md +19 -21
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 TechSpokes, Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 TechSpokes, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](https://github.com/techspokes)
|
|
10
10
|
[](https://github.com/sponsors/TechSpokes)
|
|
11
11
|
|
|
12
|
-
> **Mission**: Transform complex WSDL/XSD definitions into ergonomic, type-safe TypeScript SOAP clients with optional OpenAPI 3.1 specs and Fastify REST
|
|
12
|
+
> **Mission**: Transform complex WSDL/XSD definitions into ergonomic, type-safe TypeScript SOAP clients with optional OpenAPI 3.1 specs and production-ready Fastify REST gateways — enabling confident integration with legacy enterprise services.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -51,7 +51,7 @@ Most WSDL generators produce loosely typed stubs or expose raw XML complexity to
|
|
|
51
51
|
| **Catalog Introspection** | One JSON artifact (`catalog.json`) to drive further tooling (including OpenAPI & gateway). |
|
|
52
52
|
| **OpenAPI 3.1 Bridge** | Mirrors the exact TypeScript model with no divergence between runtime and spec. |
|
|
53
53
|
| **Standard Response Envelope** | Always-on, debuggable envelope structure (status, message, data, error) for REST gateways. |
|
|
54
|
-
| **Fastify Gateway
|
|
54
|
+
| **Fastify Gateway Generation** | Production-ready route handlers with SOAP client integration and standardized envelope responses. |
|
|
55
55
|
| **Multi-format Output** | `--openapi-format json\|yaml\|both` with always-on validation (unless disabled). |
|
|
56
56
|
| **One-Shot Pipeline** | Single pass (parse to TS to OpenAPI to Gateway) for CI & automation. |
|
|
57
57
|
|
|
@@ -106,13 +106,13 @@ npx wsdl-tsc pipeline \
|
|
|
106
106
|
|
|
107
107
|
The tool provides **five commands** for different integration scenarios:
|
|
108
108
|
|
|
109
|
-
| Command
|
|
110
|
-
|
|
111
|
-
| `compile`
|
|
112
|
-
| `client`
|
|
113
|
-
| `openapi`
|
|
114
|
-
| `gateway`
|
|
115
|
-
| `pipeline`
|
|
109
|
+
| Command | Purpose | Typical Use Case |
|
|
110
|
+
|------------|---------------------------------------------------------------|-----------------------------------------------|
|
|
111
|
+
| `compile` | Parse WSDL and emit `catalog.json` only | Debugging, inspection, or multi-stage builds |
|
|
112
|
+
| `client` | Generate TypeScript SOAP client from WSDL or catalog | Standard SOAP integration (most common) |
|
|
113
|
+
| `openapi` | Generate OpenAPI 3.1 spec from WSDL or catalog | Documentation, REST proxies, API gateways |
|
|
114
|
+
| `gateway` | Generate Fastify gateway with full handlers from OpenAPI spec | Production REST gateway with SOAP integration |
|
|
115
|
+
| `pipeline` | Run full pipeline: client + OpenAPI + gateway in one pass | CI/CD automation, complete stack generation |
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
@@ -579,23 +579,21 @@ This ensures diff-friendly output for version control.
|
|
|
579
579
|
|
|
580
580
|
## 8. Command: `gateway`
|
|
581
581
|
|
|
582
|
-
**Purpose**: Generate Fastify gateway
|
|
583
|
-
|
|
584
|
-
> **Current Status (v0.8.0)**: The gateway generator produces basic scaffolding including route registration, JSON Schema validation setup, and handler stubs. Full code generation with complete handler implementations is planned for future releases. You will need to implement the business logic that calls your SOAP client and transforms responses.
|
|
582
|
+
**Purpose**: Generate a production-ready Fastify gateway with fully functional route handlers from an OpenAPI 3.1 specification. This creates a complete REST API layer over your SOAP client with automatic request/response transformation and standardized envelope responses.
|
|
585
583
|
|
|
586
584
|
**When to use**:
|
|
587
585
|
- Building a REST API gateway for legacy SOAP services
|
|
588
586
|
- Creating a modern HTTP/JSON interface for SOAP operations
|
|
589
587
|
- Setting up request/response validation with JSON Schema
|
|
590
|
-
- Establishing Fastify routing structure
|
|
588
|
+
- Establishing Fastify routing structure with full handler implementations
|
|
591
589
|
|
|
592
590
|
**What it generates**:
|
|
593
|
-
- Fastify route registration files
|
|
591
|
+
- Fastify route registration files with complete handler implementations
|
|
594
592
|
- JSON Schema models with URN-based IDs
|
|
595
593
|
- Operation schemas (request/response validation)
|
|
596
594
|
- Schema and route registration modules
|
|
597
|
-
-
|
|
598
|
-
-
|
|
595
|
+
- Runtime utilities (envelope builders, error handlers)
|
|
596
|
+
- Fastify plugin wrapper for simplified integration
|
|
599
597
|
|
|
600
598
|
### Usage
|
|
601
599
|
|
|
@@ -647,8 +645,8 @@ npx wsdl-tsc gateway \
|
|
|
647
645
|
│ ├── <operation1>.json
|
|
648
646
|
│ ├── <operation2>.json
|
|
649
647
|
│ └── ...
|
|
650
|
-
├── routes/ #
|
|
651
|
-
│ ├── <route1>.ts
|
|
648
|
+
├── routes/ # Route registration files with full handlers
|
|
649
|
+
│ ├── <route1>.ts
|
|
652
650
|
│ ├── <route2>.ts
|
|
653
651
|
│ └── ...
|
|
654
652
|
├── schemas.ts # Schema registration module
|
|
@@ -848,9 +846,9 @@ The centralized error handler (`runtime.ts`) automatically classifies errors:
|
|
|
848
846
|
| Timeout | 504 | `GATEWAY_TIMEOUT` |
|
|
849
847
|
| Other errors | 500 | `INTERNAL_ERROR` |
|
|
850
848
|
|
|
851
|
-
### Stub Handler Mode (
|
|
849
|
+
### Stub Handler Mode (Backward Compatible)
|
|
852
850
|
|
|
853
|
-
|
|
851
|
+
If you prefer to implement handler logic manually or need custom transformation logic beyond the standard SOAP-to-REST mapping, use stub mode:
|
|
854
852
|
|
|
855
853
|
```bash
|
|
856
854
|
npx wsdl-tsc gateway \
|
|
@@ -862,7 +860,7 @@ npx wsdl-tsc gateway \
|
|
|
862
860
|
--gateway-stub-handlers
|
|
863
861
|
```
|
|
864
862
|
|
|
865
|
-
This generates handler stubs that throw "Not implemented" errors, allowing you to implement custom logic.
|
|
863
|
+
This generates minimal handler stubs that throw "Not implemented" errors, allowing you to implement fully custom logic while keeping the routing and validation infrastructure.
|
|
866
864
|
|
|
867
865
|
---
|
|
868
866
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techspokes/typescript-wsdl-client",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "TypeScript WSDL → SOAP client generator with full xs:attribute support, complex types, sequences, inheritance, and namespace-collision merging.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wsdl",
|