@techspokes/typescript-wsdl-client 0.7.11 → 0.7.13

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 (2) hide show
  1. package/README.md +44 -42
  2. package/package.json +1 -1
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 |yaml|both` with always‑on validation (unless disabled). |
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,27 @@ 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 json | yaml |both` | Output format (default json). |
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
- | `--basePath` | Prefix for REST path segments (e.g. `/v1/booking`). |
156
- | `--pathStyle kebab | asis |lower` | Control operation name → path transformation. |
157
- | `--method` | Default HTTP method (per‑op override via `--ops`). |
158
- | `--tag-style` | Tag inference: `default`, `service`, `first`. |
159
- | `--security` | Path to `security.json` (schemes + headers + overrides). |
160
- | `--tags` | Path to `tags.json` (explicit operation → tag map). |
161
- | `--ops` | Path to `ops.json` (method/summary/description/deprecated). |
162
- | `--closedSchemas` | Apply `additionalProperties:false` globally. |
163
- | `--pruneUnusedSchemas` | Emit only reachable schemas. |
164
- | `--servers` | Comma‑separated server base URLs for the spec (default: `/` if none provided). |
153
+ | Flag | Description |
154
+ |------------------------|------------------------------------------------------------------------------------------|
155
+ | `--basePath` | Prefix for REST path segments (e.g. `/v1/booking`). |
156
+ | `--pathStyle` | Control operation name → path transformation: `kebab`, `asis`, `lower`. Default: `kebab` |
157
+ | `--method` | Default HTTP method (per‑op override via `--ops`). |
158
+ | `--tag-style` | Tag inference: `default`, `service`, `first`. |
159
+ | `--security` | Path to `security.json` (schemes + headers + overrides). |
160
+ | `--tags` | Path to `tags.json` (explicit operation → tag map). |
161
+ | `--ops` | Path to `ops.json` (method/summary/description/deprecated). |
162
+ | `--closedSchemas` | Apply `additionalProperties:false` globally. |
163
+ | `--pruneUnusedSchemas` | Emit only reachable schemas. |
164
+ | `--servers` | Comma‑separated server base URLs for the spec (default: `/` if none provided). |
165
165
 
166
166
  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
167
 
@@ -186,18 +186,20 @@ If the base name you are concatenating already ends with the leading token of th
186
186
  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
187
 
188
188
  Core properties (always present in the base envelope):
189
- | Field | Type | Purpose |
190
- |-------|------|---------|
191
- | `status` | string | High‑level machine status (e.g. `SUCCESS`, `FAILURE`, `PENDING`). |
192
- | `message` | string \| null | Diagnostic / log message (not for end‑user UI). |
193
- | `data` | any \| null | Operation payload (per‑operation extension specializes this). |
194
- | `error` | Error object \| null | Populated on failures; null on success. |
189
+
190
+ | Field | Type | Purpose |
191
+ |-----------|----------------------|-------------------------------------------------------------------|
192
+ | `status` | string | High‑level machine status (e.g. `SUCCESS`, `FAILURE`, `PENDING`). |
193
+ | `message` | string \| null | Diagnostic / log message (not for end‑user UI). |
194
+ | `data` | any \| null | Operation payload (per‑operation extension specializes this). |
195
+ | `error` | Error object \| null | Populated on failures; null on success. |
195
196
 
196
197
  Error object schema fields:
197
- | Field | Type | Notes |
198
- |-------|------|-------|
199
- | `code` | string | Stable machine error code. |
200
- | `message` | string | Brief description. |
198
+
199
+ | Field | Type | Notes |
200
+ |-----------|----------------|------------------------------------------------------------|
201
+ | `code` | string | Stable machine error code. |
202
+ | `message` | string | Brief description. |
201
203
  | `details` | object \| null | Arbitrary extra info (trace IDs, validation detail, etc.). |
202
204
 
203
205
  #### Naming Rules
@@ -333,11 +335,11 @@ NODE_DEBUG=soap node app.js
333
335
 
334
336
  ---
335
337
  ## 12. Programmatic Reference (Summary)
336
- | Function | Purpose |
337
- |-------------------------|-------------------------------------------------|
338
- | `compileWsdlToProject` | WSDL → TS artifacts. |
339
- | `generateOpenAPI` | WSDL or catalog → OpenAPI (json / yaml / both). |
340
- | `runGenerationPipeline` | One pass: compile + TS emit + OpenAPI. |
338
+ | Function | Purpose |
339
+ |-------------------------|-----------------------------------------------------|
340
+ | `compileWsdlToProject` | WSDL → TS artifacts. |
341
+ | `generateOpenAPI` | WSDL or catalog → OpenAPI (`json`, `yaml`, `both`). |
342
+ | `runGenerationPipeline` | One pass: compile + TS emit + OpenAPI. |
341
343
 
342
344
  ---
343
345
  ## 13. Contributing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techspokes/typescript-wsdl-client",
3
- "version": "0.7.11",
3
+ "version": "0.7.13",
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",