@techspokes/typescript-wsdl-client 0.7.11 → 0.7.14
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 +45 -42
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
## 1. Why This Project (What Sets It Apart)
|
|
16
16
|
Most generators stop at loosely typed stubs or leak XML complexity into your application layer. This tool focuses on **correct flattening and determinism**:
|
|
17
17
|
|
|
18
|
-
| Core Differentiator | What You Get
|
|
19
|
-
|
|
20
|
-
| Attribute + Element Flattening | Attributes and child elements appear as peer properties (no nested wrapper noise).
|
|
21
|
-
| `$value` Text Content Convention | Simple & mixed content always represented as a `$value` property (collision-safe & documented). |
|
|
22
|
-
| Inheritance Resolution | `complexContent` and `simpleContent` extensions are merged or extended consistently.
|
|
23
|
-
| Choice Strategy | Predictable `all-optional` modeling today (future advanced discriminators planned).
|
|
24
|
-
| WS‑Policy Security Hints | Inline scan of policies surfaces required auth hints (e.g. `usernameToken`, `https`).
|
|
25
|
-
| Deterministic Output | Sorted declarations and stable alias resolution for diff‑friendly regeneration.
|
|
26
|
-
| Primitive Mapping Controls | Explicit flags for long / big integer / decimal / temporal families (string‑first safety).
|
|
27
|
-
| Catalog Introspection | One JSON artifact (`catalog.json`) to drive further tooling (including OpenAPI).
|
|
28
|
-
| OpenAPI 3.1 Bridge | Mirrors the exact TypeScript model — no divergence between runtime and spec.
|
|
29
|
-
| Multi‑format Output | `--format json
|
|
30
|
-
| One‑Shot Pipeline | Single pass (parse → TS → OpenAPI) for CI & automation.
|
|
18
|
+
| Core Differentiator | What You Get |
|
|
19
|
+
|----------------------------------|------------------------------------------------------------------------------------------------------|
|
|
20
|
+
| Attribute + Element Flattening | Attributes and child elements appear as peer properties (no nested wrapper noise). |
|
|
21
|
+
| `$value` Text Content Convention | Simple text & mixed content always represented as a `$value` property (collision-safe & documented). |
|
|
22
|
+
| Inheritance Resolution | `complexContent` and `simpleContent` extensions are merged or extended consistently. |
|
|
23
|
+
| Choice Strategy | Predictable `all-optional` modeling today (future advanced discriminators planned). |
|
|
24
|
+
| WS‑Policy Security Hints | Inline scan of policies surfaces required auth hints (e.g. `usernameToken`, `https`). |
|
|
25
|
+
| Deterministic Output | Sorted declarations and stable alias resolution for diff‑friendly regeneration. |
|
|
26
|
+
| Primitive Mapping Controls | Explicit flags for long / big integer / decimal / temporal families (string‑first safety). |
|
|
27
|
+
| Catalog Introspection | One JSON artifact (`catalog.json`) to drive further tooling (including OpenAPI). |
|
|
28
|
+
| OpenAPI 3.1 Bridge | Mirrors the exact TypeScript model — no divergence between runtime and spec. |
|
|
29
|
+
| Multi‑format Output | `--format json\|yaml\|both` with always‑on validation (unless disabled). |
|
|
30
|
+
| One‑Shot Pipeline | Single pass (parse → TS → OpenAPI) for CI & automation. |
|
|
31
31
|
|
|
32
32
|
**Vendor**: [TechSpokes](https://www.techspokes.com) · **Maintainer**: Serge Liatko ([@sergeliatko](https://github.com/sergeliatko))
|
|
33
33
|
|
|
@@ -141,27 +141,28 @@ npx wsdl-tsc openapi --catalog ./src/integrations/soap/hotel/catalog.json --out
|
|
|
141
141
|
### 5.1 Formats & Validation
|
|
142
142
|
| Flag | Purpose |
|
|
143
143
|
|----------------------------|------------------------------------------------------------|
|
|
144
|
-
| `--format
|
|
144
|
+
| `--format` | Output format: `json`, `yaml`, `both`. Default: `json`. |
|
|
145
145
|
| `--yaml` | (Deprecated) alias for `--format yaml` when format absent. |
|
|
146
|
-
| `--validate/--no-validate` | Validation on by default.
|
|
146
|
+
| `--validate/--no-validate` | Validation (on by default). |
|
|
147
147
|
| `--out` | Base path or explicit file (extension optional). |
|
|
148
148
|
|
|
149
149
|
### 5.2 Core Schema Parity
|
|
150
150
|
The OpenAPI schemas reproduce the **exact** flattening & naming used in `types.ts` — crucial for avoiding drift between SOAP and REST surfaces.
|
|
151
151
|
|
|
152
152
|
### 5.3 Additional Flags (Selected)
|
|
153
|
-
| Flag | Description
|
|
154
|
-
|
|
155
|
-
| `--
|
|
156
|
-
| `--
|
|
157
|
-
| `--
|
|
158
|
-
| `--
|
|
159
|
-
| `--
|
|
160
|
-
| `--
|
|
161
|
-
| `--
|
|
162
|
-
| `--
|
|
163
|
-
| `--
|
|
164
|
-
| `--
|
|
153
|
+
| Flag | Description |
|
|
154
|
+
|------------------------|------------------------------------------------------------------------------------------|
|
|
155
|
+
| `--openapi-out` | Output base or file for OpenAPI (if omitted chooses `openapi.json`). |
|
|
156
|
+
| `--basePath` | Prefix for REST path segments (e.g. `/v1/booking`). |
|
|
157
|
+
| `--pathStyle` | Control operation name → path transformation: `kebab`, `asis`, `lower`. Default: `kebab` |
|
|
158
|
+
| `--method` | Default HTTP method (per‑op override via `--ops`). Default: `post`. |
|
|
159
|
+
| `--tag-style` | Tag inference: `default`, `service`, `first`. Default: `default`. |
|
|
160
|
+
| `--security` | Path to `security.json` (schemes + headers + overrides). |
|
|
161
|
+
| `--tags` | Path to `tags.json` (explicit operation → tag map). |
|
|
162
|
+
| `--ops` | Path to `ops.json` (method/summary/description/deprecated). |
|
|
163
|
+
| `--closedSchemas` | Apply `additionalProperties:false` globally. Default: `false`. |
|
|
164
|
+
| `--pruneUnusedSchemas` | Emit only reachable schemas. Default: `false`. |
|
|
165
|
+
| `--servers` | Comma‑separated server base URLs for the spec. Default: `/`. |
|
|
165
166
|
|
|
166
167
|
Deterministic ordering: all path keys, HTTP methods, component schema names, securitySchemes, parameters, component section keys, and operation tag arrays are alphabetically sorted for diff‑friendly output. The generator also omits a custom `jsonSchemaDialect` declaration to maximize IDE/tool compatibility (JetBrains warning avoidance) unless a future flag introduces non‑default dialect selection.
|
|
167
168
|
|
|
@@ -186,18 +187,20 @@ If the base name you are concatenating already ends with the leading token of th
|
|
|
186
187
|
The same rule applies to the error namespace (e.g. `StatusErrorObject`, `StatusError_ErrorObject`). This keeps the intent obvious and signals to developers they might want to pick a shorter custom namespace.
|
|
187
188
|
|
|
188
189
|
Core properties (always present in the base envelope):
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
| `
|
|
193
|
-
| `
|
|
194
|
-
| `
|
|
190
|
+
|
|
191
|
+
| Field | Type | Purpose |
|
|
192
|
+
|-----------|----------------------|-------------------------------------------------------------------|
|
|
193
|
+
| `status` | string | High‑level machine status (e.g. `SUCCESS`, `FAILURE`, `PENDING`). |
|
|
194
|
+
| `message` | string \| null | Diagnostic / log message (not for end‑user UI). |
|
|
195
|
+
| `data` | any \| null | Operation payload (per‑operation extension specializes this). |
|
|
196
|
+
| `error` | Error object \| null | Populated on failures; null on success. |
|
|
195
197
|
|
|
196
198
|
Error object schema fields:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
| `
|
|
199
|
+
|
|
200
|
+
| Field | Type | Notes |
|
|
201
|
+
|-----------|----------------|------------------------------------------------------------|
|
|
202
|
+
| `code` | string | Stable machine error code. |
|
|
203
|
+
| `message` | string | Brief description. |
|
|
201
204
|
| `details` | object \| null | Arbitrary extra info (trace IDs, validation detail, etc.). |
|
|
202
205
|
|
|
203
206
|
#### Naming Rules
|
|
@@ -333,11 +336,11 @@ NODE_DEBUG=soap node app.js
|
|
|
333
336
|
|
|
334
337
|
---
|
|
335
338
|
## 12. Programmatic Reference (Summary)
|
|
336
|
-
| Function | Purpose
|
|
337
|
-
|
|
338
|
-
| `compileWsdlToProject` | WSDL → TS artifacts.
|
|
339
|
-
| `generateOpenAPI` | WSDL or catalog → OpenAPI (json
|
|
340
|
-
| `runGenerationPipeline` | One pass: compile + TS emit + OpenAPI.
|
|
339
|
+
| Function | Purpose |
|
|
340
|
+
|-------------------------|-----------------------------------------------------|
|
|
341
|
+
| `compileWsdlToProject` | WSDL → TS artifacts. |
|
|
342
|
+
| `generateOpenAPI` | WSDL or catalog → OpenAPI (`json`, `yaml`, `both`). |
|
|
343
|
+
| `runGenerationPipeline` | One pass: compile + TS emit + OpenAPI. |
|
|
341
344
|
|
|
342
345
|
---
|
|
343
346
|
## 13. Contributing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techspokes/typescript-wsdl-client",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.14",
|
|
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",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@apidevtools/swagger-parser": "^12.1.0",
|
|
71
71
|
"fast-xml-parser": "^5.2.5",
|
|
72
|
-
"js-yaml": "^4.1.
|
|
72
|
+
"js-yaml": "^4.1.1",
|
|
73
73
|
"soap": "^1.3.0",
|
|
74
74
|
"yargs": "^18.0.0"
|
|
75
75
|
},
|