@techspokes/typescript-wsdl-client 0.35.0 → 0.36.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.
@@ -1 +1 @@
1
- {"version":3,"file":"generateTypes.d.ts","sourceRoot":"","sources":["../../src/client/generateTypes.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,eAAe,EAA0D,MAAM,+BAA+B,CAAC;AAG5H;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,QAmRvE"}
1
+ {"version":3,"file":"generateTypes.d.ts","sourceRoot":"","sources":["../../src/client/generateTypes.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,eAAe,EAA0D,MAAM,+BAA+B,CAAC;AAI5H;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,QAsSvE"}
@@ -14,6 +14,7 @@
14
14
  */
15
15
  import fs from "node:fs";
16
16
  import { error } from "../util/cli.js";
17
+ import { hasAttributeWildcards, wildcardAttributeBagName } from "../util/attributeWildcards.js";
17
18
  /**
18
19
  * Generates TypeScript interfaces and type aliases from a compiled WSDL catalog
19
20
  *
@@ -65,6 +66,7 @@ export function generateTypes(outFile, compiled) {
65
66
  const isValidIdent = (name) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name);
66
67
  const emitPropName = (name) => (isValidIdent(name) ? name : JSON.stringify(name));
67
68
  const isChoiceUnionMode = compiled.options.choice === "union";
69
+ const wildcardBagName = wildcardAttributeBagName(compiled.options);
68
70
  const elementType = (e) => {
69
71
  const isArray = e.max === "unbounded" || (e.max > 1);
70
72
  return `${e.tsType}${isArray ? "[]" : ""}`;
@@ -123,6 +125,15 @@ export function generateTypes(outFile, compiled) {
123
125
  }
124
126
  lines.push(`${indent}${emitPropName(a.name)}${opt}: ${a.tsType};`);
125
127
  };
128
+ const emitWildcardAttributeBagProperty = (indent) => {
129
+ const annObj = {
130
+ kind: "attributeWildcard",
131
+ type: "xs:anyAttribute",
132
+ };
133
+ lines.push("");
134
+ lines.push(`${indent}/** @xsd ${JSON.stringify(annObj)} */`);
135
+ lines.push(`${indent}${emitPropName(wildcardBagName)}?: Record<string, string>;`);
136
+ };
126
137
  const isSyntheticAliasSelfWrapper = (t) => {
127
138
  const elems = t.elems || [];
128
139
  return aliasNames.has(t.name) &&
@@ -171,6 +182,9 @@ export function generateTypes(outFile, compiled) {
171
182
  }
172
183
  // Prepare lists: for complexContent extension use only local additions
173
184
  const attrsToEmit = complexBase ? (t.localAttrs || []) : (t.attrs || []);
185
+ const wildcardCarrier = complexBase
186
+ ? { attributeWildcards: t.localAttributeWildcards }
187
+ : { attributeWildcards: t.attributeWildcards };
174
188
  // Elements list similar
175
189
  let elementsToEmit = complexBase ? (t.localElems || []) : (t.elems || []);
176
190
  // SimpleContent extension special handling drops synthetic $value
@@ -205,6 +219,9 @@ export function generateTypes(outFile, compiled) {
205
219
  for (const a of attrsToEmit) {
206
220
  emitAttributeProperty(" ", a);
207
221
  }
222
+ if (hasAttributeWildcards(wildcardCarrier)) {
223
+ emitWildcardAttributeBagProperty(" ");
224
+ }
208
225
  if (0 < baseElements.length) {
209
226
  lines.push("");
210
227
  lines.push(" /**");
@@ -266,6 +283,9 @@ export function generateTypes(outFile, compiled) {
266
283
  for (const a of attrsToEmit) {
267
284
  emitAttributeProperty(" ", a);
268
285
  }
286
+ if (hasAttributeWildcards(wildcardCarrier)) {
287
+ emitWildcardAttributeBagProperty(" ");
288
+ }
269
289
  //
270
290
  // Elements — with JSDoc on every element
271
291
  //
@@ -71,6 +71,7 @@ export type CompiledChoiceGroup = {
71
71
  * @property {string} [base] - Base type name for extension/inheritance
72
72
  * @property {Array<Object>} [localAttrs] - Attributes added in extension (not inherited)
73
73
  * @property {Array<Object>} [localElems] - Elements added in extension (not inherited)
74
+ * @property {Array<Object>} [localAttributeWildcards] - Attribute wildcards added in extension
74
75
  * @property {Array<Object>} [wildcards] - xs:any wildcard particles retained on the type
75
76
  * @property {Array<Object>} [attributeWildcards] - xs:anyAttribute wildcards retained on the type
76
77
  */
@@ -114,6 +115,7 @@ export type CompiledType = {
114
115
  }>;
115
116
  wildcards?: CompiledWildcard[];
116
117
  attributeWildcards?: CompiledAttributeWildcard[];
118
+ localAttributeWildcards?: CompiledAttributeWildcard[];
117
119
  choiceGroups?: CompiledChoiceGroup[];
118
120
  localChoiceGroups?: CompiledChoiceGroup[];
119
121
  };
@@ -1 +1 @@
1
- {"version":3,"file":"schemaCompiler.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaCompiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAIzD,OAAO,KAAK,EAAC,uBAAuB,EAAE,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAEnF;;;;;;GAMG;AACH,MAAM,MAAM,KAAK,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb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CAyiCjB"}
@@ -433,6 +433,34 @@ export function compileCatalog(cat, options, streamConfig) {
433
433
  }
434
434
  return merged;
435
435
  };
436
+ const mergeWildcards = (into, list) => {
437
+ if (list.length === 0)
438
+ return into;
439
+ const merged = into ? [...into] : [];
440
+ const seen = new Set(merged.map((w) => JSON.stringify(w)));
441
+ for (const w of list) {
442
+ const key = JSON.stringify(w);
443
+ if (!seen.has(key)) {
444
+ seen.add(key);
445
+ merged.push(w);
446
+ }
447
+ }
448
+ return merged;
449
+ };
450
+ const mergeAttributeWildcards = (into, list) => {
451
+ if (list.length === 0)
452
+ return into;
453
+ const merged = into ? [...into] : [];
454
+ const seen = new Set(merged.map((w) => JSON.stringify(w)));
455
+ for (const w of list) {
456
+ const key = JSON.stringify(w);
457
+ if (!seen.has(key)) {
458
+ seen.add(key);
459
+ merged.push(w);
460
+ }
461
+ }
462
+ return merged;
463
+ };
436
464
  const collectAttributes = (node) => {
437
465
  const out = [];
438
466
  const attrs = getChildrenWithLocalName(node, "attribute");
@@ -655,12 +683,8 @@ export function compileCatalog(cat, options, streamConfig) {
655
683
  const newChoiceGroups = collectChoiceGroups(outName, cnode);
656
684
  mergeAttrs(present.attrs, newAttrs);
657
685
  mergeElems(present.elems, newElems);
658
- if (newWildcards.length > 0) {
659
- present.wildcards = [...(present.wildcards ?? []), ...newWildcards];
660
- }
661
- if (newAttributeWildcards.length > 0) {
662
- present.attributeWildcards = [...(present.attributeWildcards ?? []), ...newAttributeWildcards];
663
- }
686
+ present.wildcards = mergeWildcards(present.wildcards, newWildcards);
687
+ present.attributeWildcards = mergeAttributeWildcards(present.attributeWildcards, newAttributeWildcards);
664
688
  const mergedChoiceGroups = mergeChoiceGroups(present.choiceGroups, newChoiceGroups);
665
689
  if (mergedChoiceGroups && mergedChoiceGroups.length > 0) {
666
690
  present.choiceGroups = mergedChoiceGroups;
@@ -721,6 +745,7 @@ export function compileCatalog(cat, options, streamConfig) {
721
745
  localElems,
722
746
  ...(localWildcards.length > 0 ? { wildcards: localWildcards } : {}),
723
747
  ...(attributeWildcards.length > 0 ? { attributeWildcards } : {}),
748
+ ...(localAttributeWildcards.length > 0 ? { localAttributeWildcards } : {}),
724
749
  ...(choiceGroups.length > 0 ? { choiceGroups } : {}),
725
750
  ...(localChoiceGroups.length > 0 ? { localChoiceGroups } : {}),
726
751
  };
@@ -255,6 +255,10 @@ function canonicalizeType(t) {
255
255
  namespace: w.namespace ?? null,
256
256
  processContents: w.processContents ?? null,
257
257
  })),
258
+ localAttributeWildcards: (t.localAttributeWildcards ?? []).map((w) => ({
259
+ namespace: w.namespace ?? null,
260
+ processContents: w.processContents ?? null,
261
+ })),
258
262
  choiceGroups: (t.choiceGroups ?? []).map((g) => ({
259
263
  name: g.name,
260
264
  min: g.min,
@@ -1 +1 @@
1
- {"version":3,"file":"generateSchemas.d.ts","sourceRoot":"","sources":["../../src/openapi/generateSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAgB,eAAe,EAAe,MAAM,+BAA+B,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAwPpD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,sBAAsB,GAAG,iBAAiB,CA2D1G"}
1
+ {"version":3,"file":"generateSchemas.d.ts","sourceRoot":"","sources":["../../src/openapi/generateSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAgB,eAAe,EAAe,MAAM,+BAA+B,CAAC;AAGhG;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AA+PpD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,sBAAsB,GAAG,iBAAiB,CA6D1G"}
@@ -1,3 +1,4 @@
1
+ import { hasAttributeWildcards, wildcardAttributeBagName, wildcardAttributeBagSchema } from "../util/attributeWildcards.js";
1
2
  function isLiteralUnion(ts) {
2
3
  // very naive: split by | and ensure each trimmed starts and ends with quotes
3
4
  const parts = ts.split("|").map(p => p.trim()).filter(Boolean);
@@ -99,7 +100,7 @@ function isSyntheticAliasSelfWrapper(t, aliasNames) {
99
100
  const e = t.elems[0];
100
101
  return e.name === "$value" && e.tsType === t.name;
101
102
  }
102
- function buildComplexSchema(t, closed, knownTypeNames, aliasNames, flattenWrappers, choiceUnionMode) {
103
+ function buildComplexSchema(t, closed, knownTypeNames, aliasNames, flattenWrappers, choiceUnionMode, attributesKey) {
103
104
  // Use knownTypeNames/aliasNames to validate $ref targets so we surface
104
105
  // compiler issues early instead of emitting dangling references in OpenAPI output.
105
106
  function refOrPrimitive(ts) {
@@ -156,6 +157,12 @@ function buildComplexSchema(t, closed, knownTypeNames, aliasNames, flattenWrappe
156
157
  if (a.use === "required")
157
158
  required.push(a.name);
158
159
  }
160
+ const wildcardCarrier = t.base
161
+ ? { attributeWildcards: t.localAttributeWildcards }
162
+ : { attributeWildcards: t.attributeWildcards };
163
+ if (hasAttributeWildcards(wildcardCarrier)) {
164
+ properties[attributesKey] = wildcardAttributeBagSchema();
165
+ }
159
166
  // elements
160
167
  for (const e of t.elems) {
161
168
  const baseSchema = refOrPrimitive(e.tsType);
@@ -258,6 +265,7 @@ export function generateSchemas(compiled, opts) {
258
265
  const schemas = {};
259
266
  const typeNames = new Set(compiled.types.map(t => t.name));
260
267
  const aliasNames = new Set(compiled.aliases.map(a => a.name));
268
+ const attributesKey = wildcardAttributeBagName(compiled.options);
261
269
  // Build alias schemas first so complex types can reference them
262
270
  for (const a of compiled.aliases) {
263
271
  schemas[a.name] = buildAliasSchema(a);
@@ -266,7 +274,7 @@ export function generateSchemas(compiled, opts) {
266
274
  if (isSyntheticAliasSelfWrapper(t, aliasNames)) {
267
275
  continue;
268
276
  }
269
- schemas[t.name] = buildComplexSchema(t, closed, typeNames, aliasNames, flattenWrappers, compiled.options.choice === "union");
277
+ schemas[t.name] = buildComplexSchema(t, closed, typeNames, aliasNames, flattenWrappers, compiled.options.choice === "union", attributesKey);
270
278
  }
271
279
  if (opts.pruneUnusedSchemas) {
272
280
  // Root references: operation type names when available, falling back to element local names.
@@ -9,6 +9,7 @@ export interface MockDataOptions {
9
9
  */
10
10
  export interface CatalogForMocks {
11
11
  options?: {
12
+ attributesKey?: string;
12
13
  choice?: "all-optional" | "union";
13
14
  };
14
15
  meta?: {
@@ -41,6 +42,10 @@ export interface CatalogForMocks {
41
42
  name: string;
42
43
  max: number | "unbounded";
43
44
  }>;
45
+ attributeWildcards?: Array<{
46
+ namespace?: string;
47
+ processContents?: "lax" | "strict" | "skip";
48
+ }>;
44
49
  choiceGroups?: Array<{
45
50
  name: string;
46
51
  min: number;
@@ -1 +1 @@
1
- {"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../src/test/mockData.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;KACnC,CAAC;IACF,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA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oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,eAAe,EACxB,IAAI,CAAC,EAAE,uBAAuB,GAC7B,GAAG,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,CA+BtD"}
@@ -8,6 +8,7 @@
8
8
  * Pure logic — no I/O or side effects.
9
9
  */
10
10
  import { detectArrayWrappers, flattenMockPayload } from "../util/catalogMeta.js";
11
+ import { hasAttributeWildcards, wildcardAttributeBagName } from "../util/attributeWildcards.js";
11
12
  /**
12
13
  * Generates a mock primitive value based on the TypeScript type and property name.
13
14
  * Uses contextual defaults based on common property names.
@@ -93,14 +94,15 @@ export function generateMockData(typeName, catalog, opts, visited, depth) {
93
94
  }
94
95
  const childTypes = catalog.meta?.childType?.[typeName];
95
96
  const attrTypes = catalog.meta?.attrType?.[typeName];
96
- if ((!childTypes || Object.keys(childTypes).length === 0) && !attrTypes) {
97
+ const typeMeta = catalog.types?.find((t) => t.name === typeName);
98
+ const hasWildcardAttributes = hasAttributeWildcards(typeMeta);
99
+ if ((!childTypes || Object.keys(childTypes).length === 0) && !attrTypes && !hasWildcardAttributes) {
97
100
  return {};
98
101
  }
99
102
  const propMeta = catalog.meta?.propMeta?.[typeName] ?? {};
100
103
  const newVisited = new Set(currentVisited);
101
104
  newVisited.add(typeName);
102
105
  const result = {};
103
- const typeMeta = catalog.types?.find((t) => t.name === typeName);
104
106
  const choiceGroups = catalog.options?.choice === "union" ? (typeMeta?.choiceGroups ?? []) : [];
105
107
  const choiceBranchNames = new Set(choiceGroups.flatMap((group) => group.branches.map((branch) => branch.name)));
106
108
  const selectedChoiceBranchNames = new Set(choiceGroups
@@ -143,6 +145,14 @@ export function generateMockData(typeName, catalog, opts, visited, depth) {
143
145
  }
144
146
  }
145
147
  }
148
+ if (hasWildcardAttributes) {
149
+ const attributesKey = wildcardAttributeBagName(catalog.options);
150
+ if (!(attributesKey in result)) {
151
+ result[attributesKey] = {
152
+ "extra:trace": "sample",
153
+ };
154
+ }
155
+ }
146
156
  return result;
147
157
  }
148
158
  function generateOperationPayload(typeName, catalog) {
@@ -0,0 +1,16 @@
1
+ export declare const DEFAULT_ATTRIBUTE_BAG_KEY = "$attributes";
2
+ export interface AttributeWildcardCarrier {
3
+ attributeWildcards?: readonly unknown[];
4
+ }
5
+ export interface AttributeWildcardOptions {
6
+ attributesKey?: string;
7
+ }
8
+ export declare function hasAttributeWildcards(value: AttributeWildcardCarrier | undefined): boolean;
9
+ export declare function wildcardAttributeBagName(options: AttributeWildcardOptions | undefined): string;
10
+ export declare function wildcardAttributeBagSchema(): {
11
+ type: "object";
12
+ additionalProperties: {
13
+ type: "string";
14
+ };
15
+ };
16
+ //# sourceMappingURL=attributeWildcards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributeWildcards.d.ts","sourceRoot":"","sources":["../../src/util/attributeWildcards.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AAEvD,MAAM,WAAW,wBAAwB;IACvC,kBAAkB,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,wBAAwB,GAAG,SAAS,GAAG,OAAO,CAE1F;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,wBAAwB,GAAG,SAAS,GAAG,MAAM,CAG9F;AAED,wBAAgB,0BAA0B,IAAI;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,oBAAoB,EAAE;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAC,CAAA;CAAC,CAKrG"}
@@ -0,0 +1,14 @@
1
+ export const DEFAULT_ATTRIBUTE_BAG_KEY = "$attributes";
2
+ export function hasAttributeWildcards(value) {
3
+ return Array.isArray(value?.attributeWildcards) && value.attributeWildcards.length > 0;
4
+ }
5
+ export function wildcardAttributeBagName(options) {
6
+ const configured = options?.attributesKey?.trim();
7
+ return configured && configured.length > 0 ? configured : DEFAULT_ATTRIBUTE_BAG_KEY;
8
+ }
9
+ export function wildcardAttributeBagSchema() {
10
+ return {
11
+ type: "object",
12
+ additionalProperties: { type: "string" },
13
+ };
14
+ }
@@ -40,6 +40,7 @@ No special upgrade steps.
40
40
  - CI passed.
41
41
  - NPM package contents were validated.
42
42
  - Agent skill artifact was validated and packaged.
43
+ - Release preflight passed against the target tag.
43
44
 
44
45
  ## Notes
45
46
 
@@ -0,0 +1,32 @@
1
+ # TypeScript WSDL Client v0.36.0
2
+
3
+ ## Wildcard Attribute Contracts
4
+
5
+ This release promotes `xs:anyAttribute` from metadata-only partial support to generated contract support.
6
+
7
+ ## What This Improves
8
+
9
+ Generated TypeScript, OpenAPI, gateway, app, and generated-test artifacts now represent wildcard XML attributes through a configured attribute bag. Known XML attributes still remain flattened as peer properties, while unknown wildcard attributes stay in the bag to avoid collisions with child elements or known attributes.
10
+
11
+ ## Highlights
12
+
13
+ - `xs:anyAttribute` emits an optional attribute bag named by the configured attributes key, defaulting to `$attributes`.
14
+ - OpenAPI schemas describe wildcard attribute bags as objects with string values.
15
+ - Generated gateway and generated-test evidence now exercise the modeled wildcard attribute bag.
16
+ - GitHub push and PR CI now runs faster hosted checks while local release preflight remains the full release gate.
17
+ - Roadmap and support documentation now reflect the `0.35.0` baseline and the `xs:anyAttribute` pre-1.0 slice.
18
+
19
+ ## Upgrade Notes
20
+
21
+ No special upgrade steps.
22
+
23
+ ## Validation
24
+
25
+ - CI passed.
26
+ - NPM package contents were validated.
27
+ - Agent skill artifact was validated and packaged.
28
+ - Release preflight passed against the target tag.
29
+
30
+ ## Notes
31
+
32
+ Release tag: `v0.36.0`.
@@ -8,7 +8,7 @@ See the root [README.md](../../README.md) for project overview and the root [ROA
8
8
 
9
9
  This plan turns the 1.0 roadmap into implementation slices that can be picked up independently. Each slice has its own plan document with scope, testing strategy, acceptance gates, and release implications.
10
10
 
11
- The plan is optimized for preserving quality. The contract and compatibility baselines now exist, choice union mode is shipped, JSON array streaming is shipped, and the conformance framework is wired into validation gates. The remaining readiness work is to resolve any explicit conformance deferrals and run the final release candidate gate pass.
11
+ The plan is optimized for preserving quality. The contract and compatibility baselines now exist, choice union mode is shipped, JSON array streaming is shipped, and the conformance framework is wired into validation gates. The remaining readiness work is to review the explicit partial, diagnostic, and unsupported capability decisions, then run the final release candidate gate pass.
12
12
 
13
13
  ## Route Summary
14
14
 
@@ -19,7 +19,8 @@ The plan is optimized for preserving quality. The contract and compatibility bas
19
19
  | Choice union mode | [Choice Union Mode](v1.0-choice-union-mode.md) | complete | Implemented in `0.26.0` |
20
20
  | JSON array streaming | [JSON Array Streaming](v1.0-json-array-streaming.md) | complete | Implemented in `0.28.0` |
21
21
  | Conformance framework | [Capability Conformance Framework](v1.0-capability-conformance-framework.md) | gate wired | Pipeline claims are test-backed |
22
- | WSDL coverage matrix | [WSDL Coverage Matrix](v1.0-wsdl-coverage-matrix.md) | baseline registry | Public support is test-backed |
22
+ | WSDL coverage matrix | [WSDL Coverage Matrix](v1.0-wsdl-coverage-matrix.md) | baseline complete | Public support is test-backed |
23
+ | `xs:anyAttribute` bag | [`xs:anyAttribute` Wildcard Bag](v1.0-xs-anyattribute-wildcard-bag.md) | planned | Attribute wildcard bag emitted |
23
24
  | Release candidate | [Release Candidate Gates](v1.0-release-candidate-gates.md) | next | 1.0 release is repeatable |
24
25
 
25
26
  ## Execution Order
@@ -46,16 +47,20 @@ The registry, fixture strategy, compile runner, client evidence, OpenAPI evidenc
46
47
 
47
48
  ### Slice 6: WSDL Coverage Matrix
48
49
 
49
- The WSDL matrix rows now exist as conformance registry entries with compile, client, OpenAPI, gateway runtime, generated-test, app, documentation, and release-gate evidence. The next work is to keep those rows current while release candidate gates are prepared.
50
+ The WSDL matrix rows now exist as conformance registry entries with compile, client, OpenAPI, gateway runtime, generated-test, app, documentation, and release-gate evidence. The next work is to keep those rows current, confirm the non-supported rows are accepted 1.0 decisions, and prepare release candidate gates.
50
51
 
51
- ### Slice 7: Release Candidate Gates
52
+ ### Slice 7: xs:anyAttribute Wildcard Bag
53
+
54
+ The [`xs:anyAttribute` wildcard bag plan](v1.0-xs-anyattribute-wildcard-bag.md) is the selected scoped pre-1.0 fix. It promotes the current metadata-only partial row to supported by emitting a configured wildcard attribute bag through TypeScript, OpenAPI, gateway, generated-test, app, and documentation evidence.
55
+
56
+ ### Slice 8: Release Candidate Gates
52
57
 
53
58
  Run the release candidate gates after feature work and documentation have converged. This slice validates docs, tests, generated examples, package contents, skill artifact, release notes, and provenance workflow readiness.
54
59
 
55
60
  ## Remaining Before 1.0
56
61
 
57
- - Turn remaining unsupported, diagnostic, or partial matrix rows into diagnostics, documentation, or scoped fixes.
58
- - Confirm `docs/supported-patterns.md` matches the matrix.
62
+ - Confirm each partial, diagnostic, and unsupported matrix row is an accepted 1.0 decision or select one scoped fix.
63
+ - Confirm `docs/supported-patterns.md` still matches the generated matrix.
59
64
  - Run the release-candidate gates.
60
65
 
61
66
  ## Quality Principles
@@ -318,7 +318,7 @@ Start with these capability IDs:
318
318
  | `multi-binding-first-soap` | partial | success with documented behavior |
319
319
  | `external-policy-reference` | partial | success with documented limitation |
320
320
  | `deep-composition-sequence` | supported | success |
321
- | `xs-anyattribute` | partial | success with metadata retention |
321
+ | `xs-anyattribute` | supported | success with wildcard attribute bag evidence |
322
322
  | `mtom-xop-attachment` | unsupported | error or research |
323
323
 
324
324
  Acceptance criteria:
@@ -481,7 +481,7 @@ Every row with a `gateway` expectation should at least prove plugin import and r
481
481
 
482
482
  For supported rows, prefer one accepted request with a SOAP-wrapper-shaped mock response and an assertion on the generated success envelope. Add one rejected request only when the generated OpenAPI schema can express a meaningful invalid payload for that capability.
483
483
 
484
- For partial rows, prove the documented subset and avoid implying full support. For `xs-anyattribute`, gateway evidence should prove generation and runtime do not emit or require wildcard attribute bags. For external `PolicyReference`, gateway evidence should prove no generated inbound security requirement appears unless configured elsewhere.
484
+ For partial rows, prove the documented subset and avoid implying full support. External `PolicyReference` should not imply fetched or enforced external policy. The `xs-anyattribute` row is supported once generated TypeScript, OpenAPI, gateway, generated-test, and app evidence prove the configured wildcard attribute bag.
485
485
 
486
486
  For multi-binding rows, assert that the gateway route calls the operation selected by the deterministic first SOAP binding behavior. Do not implement explicit binding selection in this slice.
487
487
 
@@ -41,7 +41,7 @@ This slice prevents later work from building on ambiguous behavior. Choice union
41
41
 
42
42
  ### Roadmap State
43
43
 
44
- `ROADMAP.md` must reflect the current released `0.30.x` line. Choice union mode and JSON array streaming must be treated as shipped work, while capability conformance, WSDL coverage, and release-candidate gates remain the active 1.0 work.
44
+ `ROADMAP.md` must reflect the current released `0.35.x` line. Choice union mode, JSON array streaming, conformance gate wiring, and baseline WSDL coverage must be treated as shipped work, while final release-candidate gates remain the active 1.0 work.
45
45
 
46
46
  ### Release Metadata
47
47
 
@@ -63,7 +63,7 @@ Add negative tests only for newly identified contract gaps that a follow-up slic
63
63
 
64
64
  ## Acceptance Criteria
65
65
 
66
- - `ROADMAP.md` names released `0.30.x` work accurately.
66
+ - `ROADMAP.md` names released `0.35.x` work accurately.
67
67
  - `docs/roadmap/README.md` links every 1.0 slice.
68
68
  - CLI, API, and configuration docs agree on required 1.0 behavior.
69
69
  - Known contract gaps are linked to implementation slices.
@@ -29,7 +29,7 @@ The release candidate gates define what must be true before tagging `v1.0.0`. Th
29
29
 
30
30
  ### Documentation Gate
31
31
 
32
- Run `npm run docs:validate`. Confirm README, CLI reference, API reference, configuration docs, supported patterns, production docs, and roadmap agree on choice union mode and JSON array streaming.
32
+ Run `npm run docs:validate`. Confirm README, CLI reference, API reference, configuration docs, supported patterns, production docs, and roadmap agree on choice union mode, JSON array streaming, baseline conformance coverage, and Node support.
33
33
 
34
34
  ### Test Gate
35
35
 
@@ -69,6 +69,7 @@ Run `npm run release:preflight -- v1.0.0` during release preparation. Confirm re
69
69
  - The conformance gate documents `npm run test:conformance`, broad Vitest discovery, and release preflight wiring.
70
70
  - The Node gate documents Node 24 as the package floor and Node 26 as the current-line CI check.
71
71
  - Production docs describe terminal-error behavior for both stream formats.
72
+ - Release docs include release-preflight validation as a consumer-facing outcome.
72
73
  - Migration docs explain any behavior changes since `0.x`.
73
74
 
74
75
  ## Acceptance Criteria
@@ -1,10 +1,10 @@
1
1
  # Version 1.0 WSDL Coverage Matrix
2
2
 
3
- Status: baseline support registry, generated-test evidence, app evidence, and validation-gate wiring shipped before `1.0.0`.
3
+ Status: baseline support registry expanded through `0.35.0`; generated-test evidence, app evidence, and validation-gate wiring shipped before `1.0.0`.
4
4
 
5
5
  Plan for turning WSDL and XSD support claims into automated, fixture-backed evidence before 1.0. This is the first domain under the [Capability Conformance Framework](v1.0-capability-conformance-framework.md).
6
6
 
7
- The initial fixture-backed compile matrix shipped in `0.30.2` and `0.30.3`. Client, OpenAPI, gateway runtime, generated-test, and app evidence now prove the current supported and partial rows, and terminal rows have executable diagnostics. The matrix is now the public baseline support registry. Examples remain demos, while conformance fixtures are the durable support evidence. `npm test` and `npm run ci` cover the conformance suite through broad Vitest discovery, and release preflight verifies that the script wiring remains intact.
7
+ The initial fixture-backed compile matrix shipped in `0.30.2` and `0.30.3`, with the baseline support corpus expanded in `0.35.0`. Client, OpenAPI, gateway runtime, generated-test, and app evidence now prove the current supported and partial rows, and terminal rows have executable diagnostics. The matrix is now the public baseline support registry. Examples remain demos, while conformance fixtures are the durable support evidence. `npm test` and `npm run ci` cover the conformance suite through broad Vitest discovery, and release preflight verifies that the script wiring remains intact.
8
8
 
9
9
  See the root [README.md](../../README.md) for project overview and [Version 1.0 Roadmap Plan](README.md) for the complete 1.0 route.
10
10
 
@@ -59,7 +59,7 @@ Each matrix row should have a minimal fixture, an expected support status, and a
59
59
  | Multi-binding WSDLs | documented behavior | First binding or explicit selection |
60
60
  | External `PolicyReference` | partial or diagnostic | Inline policy already exists |
61
61
  | Deep composition | supported | Prove current recursion behavior |
62
- | `xs:anyAttribute` | partial | Metadata retained; generated wildcard attributes deferred |
62
+ | `xs:anyAttribute` | supported | Metadata retained; wildcard attribute bag emitted |
63
63
  | MTOM/XOP attachments | unsupported diagnostic | Keep out of 1.0 scope unless required |
64
64
 
65
65
  ## Manifest Shape
@@ -147,12 +147,12 @@ Rows that should stay compile-terminal:
147
147
 
148
148
  Each gateway-enabled row should prove plugin import, plugin registration, and at least one `fastify.inject` request when route behavior is relevant. Assertions should inspect the generated success or error envelope, not just the existence of generated files.
149
149
 
150
- Partial rows must prove only the documented subset. `xs:anyAttribute` should not imply generated wildcard attribute bags. External `PolicyReference` should not imply fetched or enforced external policy.
150
+ Partial rows must prove only the documented subset. External `PolicyReference` should not imply fetched or enforced external policy. The `xs:anyAttribute` row is supported through generated wildcard attribute bag evidence.
151
151
 
152
152
  ### Phase 3 Gotchas
153
153
 
154
154
  - Do not overclaim `supported` when gateway behavior is relevant but unproven.
155
- - Do not snapshot whole generated files for conformance rows; assert stable contract surfaces instead.
155
+ - Do not snapshoot whole generated files for conformance rows; assert stable contract surfaces instead.
156
156
  - Do not share temporary output directories across rows.
157
157
  - Do not let diagnostic or unsupported rows proceed to client, OpenAPI, or gateway generation.
158
158
  - Do not add a public inspector command in this slice.
@@ -169,6 +169,7 @@ Work items:
169
169
  - Keep release preflight's Node gate aligned with the package engine, Node 24 CI coverage, Node 26 CI coverage, and Node 24 release workflows.
170
170
  - Confirm release preflight runtime remains acceptable.
171
171
  - Keep diagnostic and unsupported rows stopped at compile.
172
+ - Decide whether the remaining partial rows stay partial for 1.0 or need one scoped pre-1.0 fix.
172
173
  - Update public docs only when a row status or public contract changes.
173
174
 
174
175
  ### Verification