@techspokes/typescript-wsdl-client 0.6.2 → 0.7.0

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.
Files changed (53) hide show
  1. package/README.md +242 -166
  2. package/dist/cli.js +223 -1
  3. package/dist/compiler/schemaCompiler.d.ts +54 -0
  4. package/dist/compiler/schemaCompiler.d.ts.map +1 -1
  5. package/dist/compiler/schemaCompiler.js +74 -7
  6. package/dist/config.d.ts +23 -0
  7. package/dist/config.d.ts.map +1 -1
  8. package/dist/emit/catalogEmitter.d.ts +18 -0
  9. package/dist/emit/catalogEmitter.d.ts.map +1 -1
  10. package/dist/emit/catalogEmitter.js +31 -0
  11. package/dist/emit/clientEmitter.d.ts +17 -0
  12. package/dist/emit/clientEmitter.d.ts.map +1 -1
  13. package/dist/emit/clientEmitter.js +33 -3
  14. package/dist/emit/typesEmitter.d.ts +16 -5
  15. package/dist/emit/typesEmitter.d.ts.map +1 -1
  16. package/dist/emit/typesEmitter.js +30 -5
  17. package/dist/emit/utilsEmitter.d.ts +18 -0
  18. package/dist/emit/utilsEmitter.d.ts.map +1 -1
  19. package/dist/emit/utilsEmitter.js +30 -0
  20. package/dist/index.d.ts +22 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +36 -1
  23. package/dist/loader/fetch.d.ts +31 -0
  24. package/dist/loader/fetch.d.ts.map +1 -1
  25. package/dist/loader/fetch.js +31 -0
  26. package/dist/loader/wsdlLoader.d.ts +32 -0
  27. package/dist/loader/wsdlLoader.d.ts.map +1 -1
  28. package/dist/loader/wsdlLoader.js +80 -9
  29. package/dist/openapi/buildPaths.d.ts +74 -0
  30. package/dist/openapi/buildPaths.d.ts.map +1 -0
  31. package/dist/openapi/buildPaths.js +66 -0
  32. package/dist/openapi/buildSchemas.d.ts +44 -0
  33. package/dist/openapi/buildSchemas.d.ts.map +1 -0
  34. package/dist/openapi/buildSchemas.js +207 -0
  35. package/dist/openapi/casing.d.ts +38 -0
  36. package/dist/openapi/casing.d.ts.map +1 -0
  37. package/dist/openapi/casing.js +49 -0
  38. package/dist/openapi/generateOpenAPI.d.ts +57 -0
  39. package/dist/openapi/generateOpenAPI.d.ts.map +1 -0
  40. package/dist/openapi/generateOpenAPI.js +174 -0
  41. package/dist/openapi/security.d.ts +82 -0
  42. package/dist/openapi/security.d.ts.map +1 -0
  43. package/dist/openapi/security.js +145 -0
  44. package/dist/pipeline.d.ts +37 -0
  45. package/dist/pipeline.d.ts.map +1 -0
  46. package/dist/pipeline.js +72 -0
  47. package/dist/util/tools.d.ts +100 -7
  48. package/dist/util/tools.d.ts.map +1 -1
  49. package/dist/util/tools.js +85 -7
  50. package/dist/xsd/primitives.d.ts +33 -0
  51. package/dist/xsd/primitives.d.ts.map +1 -1
  52. package/dist/xsd/primitives.js +59 -7
  53. package/package.json +7 -2
package/README.md CHANGED
@@ -7,223 +7,299 @@
7
7
  [![GitHub Stars](https://img.shields.io/github/stars/techspokes/typescript-wsdl-client?style=social)](https://github.com/techspokes/typescript-wsdl-client/stargazers)
8
8
  [![GitHub Forks](https://img.shields.io/github/forks/techspokes/typescript-wsdl-client?style=social)](https://github.com/techspokes/typescript-wsdl-client/network/members)
9
9
  [![GitHub Watchers](https://img.shields.io/github/watchers/techspokes/typescript-wsdl-client?style=social)](https://github.com/techspokes/typescript-wsdl-client/watchers)
10
-
11
10
  [![TechSpokes Org](https://img.shields.io/badge/org-techspokes-181717?logo=github)](https://github.com/techspokes)
12
- [![Sponsor TechSpokes](https://img.shields.io/badge/sponsor-GitHub-blue?logo=github-sponsors)](https://github.com/sponsors/TechSpokes)
13
-
14
- ## Introduction
15
-
16
- - TypeScript WSDL Client transforms WSDL/XSD schemas into a fully-typed, ready-to-use SOAP client for TypeScript.
17
- - Eliminates common SOAP pain points: inconsistent XML mappings, complex type inheritance, and module interop headaches.
18
- - Generates maintainable, diff-friendly code that runs in modern Node.js (ESM/CJS) and strict TypeScript.
11
+ [![Sponsor](https://img.shields.io/badge/sponsor-GitHub-blue?logo=github-sponsors)](https://github.com/sponsors/TechSpokes)
19
12
 
20
- With this tool you get:
21
- - End-to-end type safety: generated interfaces, aliases, and marshalling/unmarshalling logic.
22
- - Deterministic JSON ⇄ SOAP metadata: clear attribute vs element ordering.
23
- - Flexible primitive mapping: control decimals, dates, integers, and more via flags.
24
- - Automatic flattening of `<complexContent>`/`<simpleContent>` inheritance.
25
- - `<choice>` handling strategies and WS-Policy security hints baked in.
26
- - Pluggable ESM/CJS imports: target your runtime with `--imports` alone.
27
-
28
- Vendor: **[TechSpokes](https://www.techspokes.com)**
29
- Maintainer: **Serge Liatko** ([@sergeliatko](https://github.com/sergeliatko))
13
+ > **Mission**: Turn complex WSDL/XSD definitions into ergonomic, stable, type‑safe TypeScript SOAP clients — with an optional OpenAPI 3.1 bridge — so you can integrate legacy enterprise services confidently.
30
14
 
31
15
  ---
16
+ ## 1. Why This Project (What Sets It Apart)
17
+ Most generators stop at loosely typed stubs or leak XML complexity into your application layer. This tool focuses on **correct flattening and determinism**:
18
+
19
+ | Core Differentiator | What You Get |
20
+ |---------------------|--------------|
21
+ | Attribute + Element Flattening | Attributes and child elements appear as peer properties (no nested wrapper noise). |
22
+ | `$value` Text Content Convention | Simple & mixed content always represented as a `$value` property (collision-safe & documented). |
23
+ | Inheritance Resolution | `complexContent` and `simpleContent` extensions are merged or extended consistently. |
24
+ | Choice Strategy | Predictable `all-optional` modeling today (future advanced discriminators planned). |
25
+ | WS‑Policy Security Hints | Inline scan of policies surfaces required auth hints (e.g. `usernameToken`, `https`). |
26
+ | Deterministic Output | Sorted declarations and stable alias resolution for diff‑friendly regeneration. |
27
+ | Primitive Mapping Controls | Explicit flags for long / big integer / decimal / temporal families (string‑first safety). |
28
+ | Catalog Introspection | One JSON artifact (`catalog.json`) to drive further tooling (including OpenAPI). |
29
+ | OpenAPI 3.1 Bridge | Mirrors the exact TypeScript model — no divergence between runtime and spec. |
30
+ | Multi‑format Output | `--format json|yaml|both` with always‑on validation (unless disabled). |
31
+ | One‑Shot Pipeline | Single pass (parse → TS → OpenAPI) for CI & automation. |
32
+
33
+ **Vendor**: [TechSpokes](https://www.techspokes.com) · **Maintainer**: Serge Liatko ([@sergeliatko](https://github.com/sergeliatko))
32
34
 
33
- ## Installation
34
-
35
- Install the generator as a development dependency:
36
35
 
36
+ ---
37
+ ## 2. Installation
37
38
  ```bash
38
39
  npm i -D @techspokes/typescript-wsdl-client
39
- # Your app will use node-soap at runtime:
40
- npm i soap
40
+ npm i soap # runtime dependency for actual SOAP calls
41
41
  ```
42
42
 
43
43
  ---
44
+ ## 3. Typical Repository Layout
45
+ You usually want generated SOAP clients under a namespaced integration folder. Examples:
46
+ ```
47
+ src/
48
+ services/
49
+ third-party/
50
+ weather/
51
+ client.ts
52
+ types.ts
53
+ utils.ts
54
+ catalog.json
55
+ openapi.json
56
+ ```
57
+ Pick a structure that communicates ownership and stability. Regenerate into the same folder for clean diffs.
44
58
 
45
- ## Quick Start
46
-
47
- ### Generate a SOAP Client
48
-
49
- Run the following command to generate a client from your WSDL file:
59
+ ---
60
+ ## 4. Primary Usage: Generate a TypeScript SOAP Client
61
+ The **SOAP client generation** is the core of this project and the most common use case.
50
62
 
63
+ ### 4.1 Quick Start
51
64
  ```bash
52
- npx wsdl-tsc --wsdl ./spec/wsdl/MyService.wsdl --out ./src/services/my-service
65
+ npx wsdl-tsc --wsdl ./wsdl/Weather.wsdl --out ./src/services/third-party/weather
53
66
  ```
54
67
 
55
- ### Use the Generated Client
68
+ **Try with included example:**
69
+ ```bash
70
+ npx wsdl-tsc --wsdl examples/minimal/weather.wsdl --out ./tmp/weather
71
+ ```
56
72
 
73
+ Imports afterward:
57
74
  ```ts
58
- import soap from "soap";
59
- import { MyService } from "./services/my-service/client.js";
75
+ import { Weather } from "../services/third-party/weather/client.js";
76
+ ```
60
77
 
61
- const client = new MyService({
62
- source: "https://example.com/MyService?wsdl",
63
- security: new soap.WSSecurity("user", "pass")
64
- });
78
+ ### 4.2 What Gets Generated
79
+ | File | Purpose |
80
+ |------|---------|
81
+ | `client.ts` | Strongly typed wrapper with one method per operation. |
82
+ | `types.ts` | Flattened interfaces & literal/enum aliases. |
83
+ | `utils.ts` | Metadata (attribute vs element, occurrence, nillable). |
84
+ | `catalog.json` | (If `--catalog`) compiled representation for debugging / OpenAPI reuse. |
85
+
86
+ ### 4.3 Key Modeling Rules Recap
87
+ - **Attributes & elements** → peer properties.
88
+ - **Text content** → `$value`.
89
+ - **Required attributes**: `use!=optional`; elements `min>=1`.
90
+ - **Multiplicity**: `max>1` or `unbounded` → arrays.
91
+ - **Nillable**: `nillable="true"` preserved (optionally modelled optional with `--nillable-as-optional`).
92
+ - **Inheritance**: extensions merged or emitted as extends; simpleContent base collapsed logically.
93
+
94
+ ### 4.4 CLI Flags (SOAP Client)
95
+ | Flag | Default | Description |
96
+ |------|---------|-------------|
97
+ | `--wsdl` | (required) | Local path or URL to WSDL. |
98
+ | `--out` | (required) | Output directory. |
99
+ | `--imports` | `js` | Intra‑generated import style: `js`, `ts`, `bare`. |
100
+ | `--catalog` | `false` | Emit `catalog.json`. |
101
+ | `--client-name` | derived | Override exported class name. |
102
+ | `--attributes-key` | `$attributes` | Attribute bag key. |
103
+ | `--choice` | `all-optional` | Current choice strategy. |
104
+ | `--nillable-as-optional` | `false` | Treat nillable elements as optional props. |
105
+ | `--fail-on-unresolved` | `true` | Fail build on unresolved references. |
106
+ | `--int64-as` | `string` | Map 64‑bit integer types. |
107
+ | `--bigint-as` | `string` | Map arbitrary-size integer family. |
108
+ | `--decimal-as` | `string` | Map `xs:decimal`. |
109
+ | `--date-as` | `string` | Map date/time/duration primitives. |
110
+
111
+ ### 4.5 Example With Safer Numeric Decisions
112
+ ```bash
113
+ npx wsdl-tsc \
114
+ --wsdl https://example.com/Hotel.wsdl \
115
+ --out ./src/integrations/soap/hotel \
116
+ --int64-as number \
117
+ --decimal-as string \
118
+ --date-as string \
119
+ --catalog
120
+ ```
65
121
 
66
- const response = await client.MyOperation({
67
- MyOperationRQ: {
68
- MyElement: {
69
- MyAttribute: "value",
70
- ChildElementA: "valueA",
71
- },
72
- },
122
+ ### 4.6 Programmatic Generation (TypeScript Only)
123
+ ```ts
124
+ import { compileWsdlToProject } from "@techspokes/typescript-wsdl-client";
125
+ await compileWsdlToProject({
126
+ wsdl: "./wsdl/Hotel.wsdl",
127
+ outDir: "./src/integrations/soap/hotel"
73
128
  });
74
-
75
- console.log(response);
76
129
  ```
77
130
 
78
131
  ---
132
+ ## 5. Generating an OpenAPI 3.1 Definition (as a standalone run)
133
+ If you already have generated your SOAP client and just want an HTTP-friendly spec for proxies / gateways / docs:
134
+ ```bash
135
+ npx wsdl-tsc openapi --wsdl ./wsdl/Hotel.wsdl --out ./openapi/hotel --format both
136
+ ```
137
+ Or reuse a previously generated catalog:
138
+ ```bash
139
+ npx wsdl-tsc openapi --catalog ./src/integrations/soap/hotel/catalog.json --out ./openapi/hotel
140
+ ```
79
141
 
80
- ## Features
81
-
82
- - **Primitive-type mapping**: Fine-grained flags (`--int64-as`, `--bigint-as`, `--decimal-as`, `--date-as`) so you don't have to hand-roll conversions for odd XSD primitives.
83
- - **Complex/simpleContent inheritance**: Automatically flattens and extends base types for `<complexContent>` and `<simpleContent>` extensions.
84
- - **Deterministic metadata**: Emits runtime maps for JSON SOAP mapping—clear attribute vs element distinctions and order.
85
- - **Choice element support**: Two modes (`all-optional` or `union`) to handle `<choice>` constructs exactly how you need.
86
- - **Fail-fast unresolved references**: `--fail-on-unresolved` aborts codegen on missing type refs to catch XSD import issues early.
87
- - **WS-Policy security hints**: Parses WS-Policy tokens and surfaces required security hints in generated JSDoc.
88
- - **Full catalog introspection**: `--catalog` emits a JSON dump of the compiled schema for debugging large/malformed WSDLs.
89
- - **Stable, sorted output**: Interfaces, aliases, attributes, and elements are consistently sorted for diff-friendly regeneration.
90
- - **ESM/CJS interop & custom imports**: `--imports js|ts|bare` lets you target your module system without manual edits.
91
- - **Attributes and child elements**: Supports both XML attributes and nested elements (including mixed `$value` content).
92
- - **Security integration**: Works with any `soap.ISecurity` (e.g., `WSSecurity`, `BasicAuthSecurity`) for seamless auth.
142
+ ### 5.1 Formats & Validation
143
+ | Flag | Purpose |
144
+ |------|---------|
145
+ | `--format json|yaml|both` | Output format (default json). |
146
+ | `--yaml` | (Deprecated) alias for `--format yaml` when format absent. |
147
+ | `--validate/--no-validate` | Validation on by default. |
148
+ | `--out` | Base path or explicit file (extension optional). |
149
+
150
+ ### 5.2 Core Schema Parity
151
+ The OpenAPI schemas reproduce the **exact** flattening & naming used in `types.ts` — crucial for avoiding drift between SOAP and REST surfaces.
152
+
153
+ ### 5.3 Additional Flags (Selected)
154
+ | Flag | Description |
155
+ |------|-------------|
156
+ | `--basePath` | Prefix for REST path segments (e.g. `/v1/booking`). |
157
+ | `--pathStyle kebab|asis|lower` | Control operation name → path transformation. |
158
+ | `--method` | Default HTTP method (per‑op override via `--ops`). |
159
+ | `--tag-style` | Tag inference: `default`, `service`, `first`. |
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. |
164
+ | `--pruneUnusedSchemas` | Emit only reachable schemas. |
165
+
166
+ ### 5.4 Programmatic OpenAPI Generation
167
+ ```ts
168
+ import { generateOpenAPI } from "@techspokes/typescript-wsdl-client";
169
+ const { jsonPath, yamlPath } = await generateOpenAPI({
170
+ wsdl: "./wsdl/Hotel.wsdl",
171
+ outFile: "./openapi/hotel",
172
+ format: "both"
173
+ });
174
+ ```
93
175
 
94
176
  ---
95
-
96
- ## CLI Usage
97
-
177
+ ## 6. One‑Shot Pipeline (SOAP Client + OpenAPI Together)
178
+ Ideal for CI: single WSDL parse → TS artifacts + catalog + OpenAPI (validated).
98
179
  ```bash
99
- wsdl-tsc --wsdl <path-or-url> --out <dir> [options]
180
+ npx wsdl-tsc pipeline --wsdl ./wsdl/Hotel.wsdl --out ./src/integrations/soap/hotel --format both
100
181
  ```
101
182
 
102
- ### Required Flags
103
- - `--wsdl`: Path or URL to the WSDL file.
104
- - `--out`: Output directory for the generated files.
183
+ | Pipeline Flag | Default | Notes |
184
+ |---------------|---------|-------|
185
+ | All SOAP flags | | Same semantics as base generation. |
186
+ | All OpenAPI flags | — | Same semantics as standalone openapi. |
187
+ | `--openapi-out` | derived | Override OpenAPI base file. |
188
+ | `--format` | json | Multi-format control. |
189
+ | `--validate/--no-validate` | validate | Spec validation toggle. |
190
+ | `--tag-style` | default | Tag inference. |
105
191
 
106
- ### Options
107
-
108
- | Flag | Type | Choices | Default | Description |
109
- |------------------------|-----------|--------------------------------|----------------|------------------------------------------------------------------|
110
- | `--imports` | string | js, ts, bare | js | Intra-generated import specifiers: '.js', '.ts', or bare |
111
- | `--catalog` | boolean | true, false | false | Emit catalog.json for introspection |
112
- | `--client-name` | string | — | derived | Override the exported client class name |
113
- | `--attributes-key` | string | any | $attributes | Key used by runtime marshaller for XML attributes |
114
- | `--int64-as` | string | string, number, bigint | string | How to map xs:long/xs:unsignedLong |
115
- | `--bigint-as` | string | string, number | string | How to map xs:integer family (positive/nonNegative/etc.) |
116
- | `--decimal-as` | string | string, number | string | How to map xs:decimal (money/precision) |
117
- | `--date-as` | string | string, Date | string | How to map date/time/duration types |
118
- | `--choice` | string | all-optional, union | all-optional | Representation of `<choice>` elements |
119
- | `--fail-on-unresolved` | boolean | true, false | true | Fail if any type references cannot be resolved |
120
- | `--nillable-as-optional` | boolean | true, false | false | Treat nillable elements as optional properties in types |
192
+ Programmatic single pass:
193
+ ```ts
194
+ import { runGenerationPipeline } from "@techspokes/typescript-wsdl-client";
195
+ await runGenerationPipeline({
196
+ wsdl: "./wsdl/Hotel.wsdl",
197
+ outDir: "./src/integrations/soap/hotel",
198
+ openapi: { format: "both", tagStyle: "service" }
199
+ });
200
+ ```
121
201
 
122
202
  ---
123
-
124
- ## Generated Files
125
-
126
- The generator produces the following files in the output directory:
127
-
128
- ```
129
- <out>/
130
- types.ts # TypeScript interfaces and type aliases
131
- utils.ts # Runtime metadata for JSON ⇄ SOAP mapping
132
- client.ts # Strongly-typed SOAP client wrapper
133
- catalog.json # (optional) Compiled catalog JSON if `--catalog` is set
203
+ ## 7. Security Configuration (OpenAPI)
204
+ `security.json` example:
205
+ ```json
206
+ {
207
+ "global": {
208
+ "scheme": "bearer",
209
+ "bearer": { "bearerFormat": "JWT" },
210
+ "headers": [ { "name": "X-Correlation-Id", "required": false, "schema": { "type": "string" } } ]
211
+ },
212
+ "overrides": {
213
+ "CancelBooking": { "scheme": "apiKey" }
214
+ }
215
+ }
134
216
  ```
217
+ Supported `scheme`: `none|basic|bearer|apiKey|oauth2`.
135
218
 
136
219
  ---
220
+ ## 8. Tag Inference Strategies
221
+ | Strategy | Behavior |
222
+ |----------|----------|
223
+ | `default` | Single tag = service name (fallback `SOAP`). |
224
+ | `service` | Always service name (even if operation prefix differs). |
225
+ | `first` | First lexical segment of CamelCase operation (e.g. `GetCityWeatherByZIP` → `Get`). |
137
226
 
138
- ## Advanced Usage
139
-
140
- ### Programmatic API
141
-
142
- You can use the generator programmatically:
227
+ Provide `tags.json` for explicit mapping when heuristics are insufficient.
143
228
 
229
+ ---
230
+ ## 9. Working With the Generated Client
231
+ ### 9.1 SOAP Client Construction
144
232
  ```ts
145
- import { compileWsdlToProject } from "@techspokes/typescript-wsdl-client";
233
+ import soap from "soap";
234
+ import { Hotel } from "./src/integrations/soap/hotel/client.js";
146
235
 
147
- await compileWsdlToProject({
148
- wsdl: "./spec/wsdl/MyService.wsdl",
149
- outDir: "./generated",
150
- options: {
151
- imports: "js",
152
- catalog: true,
153
- primitive: {
154
- int64As: "string",
155
- bigIntegerAs: "string",
156
- decimalAs: "string",
157
- dateAs: "string",
158
- },
159
- choice: "all-optional",
160
- failOnUnresolved: true,
161
- attributesKey: "$attributes",
162
- clientName: "MyServiceClient",
163
- nillableAsOptional: false,
164
- },
236
+ const hotel = new Hotel({
237
+ source: "https://example.com/HotelService?wsdl",
238
+ security: new soap.WSSecurity("user", "pass")
239
+ });
240
+
241
+ const res = await hotel.GetReservation({
242
+ GetReservationRQ: { ReservationId: "ABC123" }
165
243
  });
166
244
  ```
245
+ ### 9.2 Attributes & Text Values
246
+ If an element has text content and attributes, you pass both:
247
+ ```ts
248
+ const Price = {
249
+ currencyCode: "USD",
250
+ $value: "123.45"
251
+ };
252
+ ```
167
253
 
168
254
  ---
169
-
170
- ## Troubleshooting
171
-
172
- - CLI errors
173
- "Error: Cannot parse WSDL" verify file path or URL; test with `curl -I <wsdl-url>`.
174
- "Cannot resolve type XYZ" ensure all XSD imports are reachable or use `--fail-on-unresolved=false`.
175
- - Module resolution
176
- `ERR_MODULE_NOT_FOUND` align import extensions: use `--imports js` (adds `.js`), `--imports ts` (adds `.ts`), or `--imports bare` for no extension.
177
- - TypeScript type issues
178
- • "Cannot find module './client'" → run `npm run typecheck`, confirm your `outDir` matches import paths, and include generated `.d.ts`.
179
- - Runtime SOAP errors
180
- • Enable raw SOAP logging:
181
- ```bash
182
- NODE_DEBUG=soap node your-app.js
183
- ```
184
- • "wsdl is not valid" → update `soap` to latest (`npm i soap@latest`).
185
- - Security warnings
186
- • Missing or invalid headers → pass a valid `soap.ISecurity` instance:
187
- ```ts
188
- new soap.WSSecurity("user","pass",{passwordType:"PasswordText"});
189
- ```
190
- - XML attribute/content issues
191
- • Wrong key in requests → override with `--attributes-key inKey[:outKey]` (e.g., `--attributes-key $attributes:attributes`).
255
+ ## 10. Advanced Topics
256
+ | Topic | Notes |
257
+ |-------|-------|
258
+ | Primitive mapping philosophy | Defaults prefer string to avoid precision loss. |
259
+ | Choice flattening | Represented as optional union of fields simpler consumption. |
260
+ | Array wrappers | Single repeated child w/out attributes collapses to an array schema in OpenAPI. |
261
+ | Validation | Uses `@apidevtools/swagger-parser`; disable with `--no-validate`. |
262
+ | Future | Discriminated unions for choices, richer policy extraction, snapshot OpenAPI tests. |
192
263
 
193
264
  ---
194
-
195
- ## Roadmap
196
-
197
- Please see the [ROADMAP.md](ROADMAP.md) for planned features and improvements.
265
+ ## 11. Troubleshooting
266
+ | Symptom | Resolution |
267
+ |---------|------------|
268
+ | WSDL fetch fails | Curl the URL, check TLS/proxy, retry with local copy. |
269
+ | Unresolved types | Re-run with `--fail-on-unresolved=false` to inspect partial graph. |
270
+ | Missing schema in OpenAPI | Ensure the global element exists (catalog shows compiled symbols). |
271
+ | Wrong array modeling | Check `maxOccurs` in WSDL; tool only arrays when `max>1` or `unbounded`. |
272
+ | Auth errors at runtime | Provide a proper `soap.ISecurity` instance (`WSSecurity`, etc.). |
273
+ | Date/time confusion | Use `--date-as Date` for runtime Date objects. |
274
+
275
+ Enable SOAP wire logging:
276
+ ```bash
277
+ NODE_DEBUG=soap node app.js
278
+ ```
198
279
 
199
280
  ---
200
-
201
- ## Contributing
202
-
203
- We welcome contributions! Please see the following resources:
204
- - [CONTRIBUTING.md](CONTRIBUTING.md): Development workflow and guidelines.
205
- - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md): Community expectations.
206
- - [SECURITY.md](SECURITY.md): Reporting vulnerabilities.
281
+ ## 12. Programmatic Reference (Summary)
282
+ | Function | Purpose |
283
+ |----------|---------|
284
+ | `compileWsdlToProject` | WSDL TS artifacts. |
285
+ | `generateOpenAPI` | WSDL or catalog → OpenAPI (json / yaml / both). |
286
+ | `runGenerationPipeline` | One pass: compile + TS emit + OpenAPI. |
207
287
 
208
288
  ---
289
+ ## 13. Contributing
290
+ 1. Fork & branch.
291
+ 2. `npm i && npm run build`.
292
+ 3. Use `npm run smoke:gen`, `npm run smoke:pipeline`, `npm run smoke:openapi:validate`.
293
+ - Note: These smoke tests use `examples/minimal/weather.wsdl` for quick validation.
294
+ 4. Add a bullet under **Unreleased** in `CHANGELOG.md`.
209
295
 
210
- ## License
211
-
212
- MIT © TechSpokes.
213
- *The tool is MIT-licensed. Generated artifacts are owned by you; the tool imposes no license on generated files.*
296
+ See also: `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`.
214
297
 
215
298
  ---
299
+ ## 14. License
300
+ MIT © TechSpokes — Generated artifacts are fully yours.
216
301
 
217
- ## Sponsors
218
-
219
- **Silver Sponsors**
220
- - Your Name Here!
221
-
222
- **Gold Sponsors**
223
- - [Your Name or Company (with a link) Here!](https://your-link-here.com)
224
-
225
- **Platinum Sponsors**
226
- - [Your Name or Company (with a link) Here!](https://your-link-here.com)
227
- - **AND** 30-min one-to-one video meeting on AI, business automations, vacation rentals industry, development, tools, or a subject of your choice.
228
-
229
- Want to see your name or company here? [Become a sponsor!](https://github.com/sponsors/TechSpokes)
302
+ ---
303
+ ## 15. Sponsors
304
+ Support ongoing maintenance: https://github.com/sponsors/TechSpokes
305
+ *Your brand could be featured here.*