@skmtc/core 0.16.2 → 0.18.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.
Files changed (135) hide show
  1. package/esm/context/GenerateContext.d.ts +3 -3
  2. package/esm/context/GenerateContext.d.ts.map +1 -1
  3. package/esm/context/GenerateContext.js +45 -32
  4. package/esm/context/ParseContext.d.ts +16 -0
  5. package/esm/context/ParseContext.d.ts.map +1 -1
  6. package/esm/context/ParseContext.js +26 -0
  7. package/esm/context/ParseIssue.d.ts +24 -4
  8. package/esm/context/ParseIssue.d.ts.map +1 -1
  9. package/esm/context/ParseIssue.js +12 -4
  10. package/esm/context/parseTypes.d.ts +23 -1
  11. package/esm/context/parseTypes.d.ts.map +1 -1
  12. package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
  13. package/esm/dsl/model/ModelDriver.js +29 -0
  14. package/esm/dsl/model/toModelEntry.d.ts +9 -3
  15. package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
  16. package/esm/dsl/model/toModelEntry.js +29 -1
  17. package/esm/dsl/model/toModelProjectionBase.d.ts +16 -3
  18. package/esm/dsl/model/toModelProjectionBase.d.ts.map +1 -1
  19. package/esm/dsl/model/toModelProjectionBase.js +3 -3
  20. package/esm/dsl/model/types.d.ts +46 -0
  21. package/esm/dsl/model/types.d.ts.map +1 -1
  22. package/esm/dsl/operation/gql/types.d.ts +6 -1
  23. package/esm/dsl/operation/gql/types.d.ts.map +1 -1
  24. package/esm/dsl/operation/oas/types.d.ts +6 -1
  25. package/esm/dsl/operation/oas/types.d.ts.map +1 -1
  26. package/esm/enrichments/validateConfig.d.ts +60 -0
  27. package/esm/enrichments/validateConfig.d.ts.map +1 -0
  28. package/esm/enrichments/validateConfig.js +176 -0
  29. package/esm/mod.d.ts +1 -0
  30. package/esm/mod.d.ts.map +1 -1
  31. package/esm/mod.js +1 -0
  32. package/esm/oas/operation/Operation.d.ts.map +1 -1
  33. package/esm/oas/operation/Operation.js +2 -11
  34. package/esm/oas/response/toPrimaryResponseCode.d.ts +19 -0
  35. package/esm/oas/response/toPrimaryResponseCode.d.ts.map +1 -0
  36. package/esm/oas/response/toPrimaryResponseCode.js +33 -0
  37. package/esm/oas/webhook/Webhook.d.ts.map +1 -1
  38. package/esm/oas/webhook/Webhook.js +2 -11
  39. package/esm/parse/v3-0/_merge-all-of/decompose-union.d.ts.map +1 -1
  40. package/esm/parse/v3-0/_merge-all-of/decompose-union.js +8 -12
  41. package/esm/parse/v3-0/_merge-all-of/merge-union.d.ts.map +1 -1
  42. package/esm/parse/v3-0/_merge-all-of/merge-union.js +0 -8
  43. package/esm/parse/v3-0/integer/toInteger.js +4 -1
  44. package/esm/parse/v3-0/number/toNumber.js +4 -1
  45. package/esm/parse/v3-0/operation/toOperationsV3.d.ts.map +1 -1
  46. package/esm/parse/v3-0/operation/toOperationsV3.js +5 -1
  47. package/esm/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
  48. package/esm/parse/v3-0/schema/toSchemasV3.js +35 -1
  49. package/esm/parse/v3-0/string/toString.d.ts.map +1 -1
  50. package/esm/parse/v3-0/string/toString.js +4 -11
  51. package/esm/parse/v3-1/_merge-all-of/decompose-union.d.ts.map +1 -1
  52. package/esm/parse/v3-1/_merge-all-of/decompose-union.js +8 -12
  53. package/esm/parse/v3-1/_merge-all-of/merge-union.d.ts.map +1 -1
  54. package/esm/parse/v3-1/_merge-all-of/merge-union.js +0 -8
  55. package/esm/parse/v3-1/integer/toInteger.js +4 -1
  56. package/esm/parse/v3-1/number/toNumber.js +4 -1
  57. package/esm/parse/v3-1/operation/toOperationsV3.d.ts.map +1 -1
  58. package/esm/parse/v3-1/operation/toOperationsV3.js +5 -1
  59. package/esm/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
  60. package/esm/parse/v3-1/schema/toSchemasV3.js +34 -7
  61. package/esm/parse/v3-1/string/toString.d.ts.map +1 -1
  62. package/esm/parse/v3-1/string/toString.js +4 -11
  63. package/esm/types/Manifest.d.ts.map +1 -1
  64. package/esm/types/Manifest.js +14 -0
  65. package/esm/types/Settings.d.ts +16 -3
  66. package/esm/types/Settings.d.ts.map +1 -1
  67. package/esm/types/Settings.js +19 -13
  68. package/package.json +1 -1
  69. package/script/context/GenerateContext.d.ts +3 -3
  70. package/script/context/GenerateContext.d.ts.map +1 -1
  71. package/script/context/GenerateContext.js +45 -32
  72. package/script/context/ParseContext.d.ts +16 -0
  73. package/script/context/ParseContext.d.ts.map +1 -1
  74. package/script/context/ParseContext.js +26 -0
  75. package/script/context/ParseIssue.d.ts +24 -4
  76. package/script/context/ParseIssue.d.ts.map +1 -1
  77. package/script/context/ParseIssue.js +12 -4
  78. package/script/context/parseTypes.d.ts +23 -1
  79. package/script/context/parseTypes.d.ts.map +1 -1
  80. package/script/dsl/model/ModelDriver.d.ts.map +1 -1
  81. package/script/dsl/model/ModelDriver.js +29 -0
  82. package/script/dsl/model/toModelEntry.d.ts +9 -3
  83. package/script/dsl/model/toModelEntry.d.ts.map +1 -1
  84. package/script/dsl/model/toModelEntry.js +65 -1
  85. package/script/dsl/model/toModelProjectionBase.d.ts +16 -3
  86. package/script/dsl/model/toModelProjectionBase.d.ts.map +1 -1
  87. package/script/dsl/model/toModelProjectionBase.js +3 -3
  88. package/script/dsl/model/types.d.ts +46 -0
  89. package/script/dsl/model/types.d.ts.map +1 -1
  90. package/script/dsl/operation/gql/types.d.ts +6 -1
  91. package/script/dsl/operation/gql/types.d.ts.map +1 -1
  92. package/script/dsl/operation/oas/types.d.ts +6 -1
  93. package/script/dsl/operation/oas/types.d.ts.map +1 -1
  94. package/script/enrichments/validateConfig.d.ts +60 -0
  95. package/script/enrichments/validateConfig.d.ts.map +1 -0
  96. package/script/enrichments/validateConfig.js +213 -0
  97. package/script/mod.d.ts +1 -0
  98. package/script/mod.d.ts.map +1 -1
  99. package/script/mod.js +1 -0
  100. package/script/oas/operation/Operation.d.ts.map +1 -1
  101. package/script/oas/operation/Operation.js +2 -11
  102. package/script/oas/response/toPrimaryResponseCode.d.ts +19 -0
  103. package/script/oas/response/toPrimaryResponseCode.d.ts.map +1 -0
  104. package/script/oas/response/toPrimaryResponseCode.js +37 -0
  105. package/script/oas/webhook/Webhook.d.ts.map +1 -1
  106. package/script/oas/webhook/Webhook.js +2 -11
  107. package/script/parse/v3-0/_merge-all-of/decompose-union.d.ts.map +1 -1
  108. package/script/parse/v3-0/_merge-all-of/decompose-union.js +8 -12
  109. package/script/parse/v3-0/_merge-all-of/merge-union.d.ts.map +1 -1
  110. package/script/parse/v3-0/_merge-all-of/merge-union.js +0 -8
  111. package/script/parse/v3-0/integer/toInteger.js +4 -1
  112. package/script/parse/v3-0/number/toNumber.js +4 -1
  113. package/script/parse/v3-0/operation/toOperationsV3.d.ts.map +1 -1
  114. package/script/parse/v3-0/operation/toOperationsV3.js +5 -1
  115. package/script/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
  116. package/script/parse/v3-0/schema/toSchemasV3.js +35 -1
  117. package/script/parse/v3-0/string/toString.d.ts.map +1 -1
  118. package/script/parse/v3-0/string/toString.js +3 -10
  119. package/script/parse/v3-1/_merge-all-of/decompose-union.d.ts.map +1 -1
  120. package/script/parse/v3-1/_merge-all-of/decompose-union.js +8 -12
  121. package/script/parse/v3-1/_merge-all-of/merge-union.d.ts.map +1 -1
  122. package/script/parse/v3-1/_merge-all-of/merge-union.js +0 -8
  123. package/script/parse/v3-1/integer/toInteger.js +4 -1
  124. package/script/parse/v3-1/number/toNumber.js +4 -1
  125. package/script/parse/v3-1/operation/toOperationsV3.d.ts.map +1 -1
  126. package/script/parse/v3-1/operation/toOperationsV3.js +5 -1
  127. package/script/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
  128. package/script/parse/v3-1/schema/toSchemasV3.js +34 -7
  129. package/script/parse/v3-1/string/toString.d.ts.map +1 -1
  130. package/script/parse/v3-1/string/toString.js +3 -10
  131. package/script/types/Manifest.d.ts.map +1 -1
  132. package/script/types/Manifest.js +14 -0
  133. package/script/types/Settings.d.ts +16 -3
  134. package/script/types/Settings.d.ts.map +1 -1
  135. package/script/types/Settings.js +16 -10
@@ -1,7 +1,6 @@
1
1
  // Convert a schema object into an array of schemas that can be merged iteratively into a new schema
2
2
  export const decomposeUnion = ({ schema, groupType }) => {
3
3
  if (!schema[groupType]) {
4
- console.log('NO GROUP TYPE', JSON.stringify(schema, null, 2));
5
4
  return {
6
5
  beforeExcluded: {},
7
6
  decomposed: [schema],
@@ -38,15 +37,13 @@ export const decomposeUnion = ({ schema, groupType }) => {
38
37
  };
39
38
  return result;
40
39
  };
41
- // Kept on the union (via beforeExcluded/afterExcluded) rather than
42
- // cross-product-merged into each member. Two reasons a key lands here:
43
- // - Union-level metadata: merging it *into* a member resolves `$ref`
44
- // members (to merge the metadata in), losing their names — `toUnion`
45
- // already captures this metadata on the union itself.
46
- // - Non-distributable constraints (`not`): they have no per-member meaning
47
- // and `mergeSchemasOrRefs` cannot merge them, so distributing them throws
48
- // for every member and collapses the union to an empty array. TypeScript
49
- // can't model `not` anyway, so it rides the union wrapper, ignored.
40
+ // Union-level keys: kept on the union (via beforeExcluded/afterExcluded)
41
+ // rather than cross-product-merged into each member. Merging a metadata key
42
+ // *into* a member would resolve `$ref` members (to merge it in), losing their
43
+ // names — `toUnion` already captures these on the union itself.
44
+ // (`not` is deliberately NOT excluded here — it has no faithful TypeScript
45
+ // representation, so a schema using it is refused upstream in `toSchemaV3`
46
+ // rather than silently dropped from the union.)
50
47
  const excludedProperties = [
51
48
  'discriminator',
52
49
  'default',
@@ -57,8 +54,7 @@ const excludedProperties = [
57
54
  'examples',
58
55
  'readOnly',
59
56
  'writeOnly',
60
- 'deprecated',
61
- 'not'
57
+ 'deprecated'
62
58
  ];
63
59
  const exclude = (entries) => {
64
60
  return entries.reduce((acc, [key, value]) => {
@@ -1 +1 @@
1
- {"version":3,"file":"merge-union.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/_merge-all-of/merge-union.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI3E,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,+BAA+B,cAAc,KAAG,iBAiC1E,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,sCAK/B,qBAAqB,KAAG,YAkC1B,CAAA"}
1
+ {"version":3,"file":"merge-union.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/_merge-all-of/merge-union.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI3E,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,+BAA+B,cAAc,KAAG,iBAiC1E,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,sCAK/B,qBAAqB,KAAG,YAyB1B,CAAA"}
@@ -42,14 +42,6 @@ export const mergeCrossProduct = ({ first, second, getRef, groupType }) => {
42
42
  }
43
43
  })
44
44
  .filter(item => item !== undefined);
45
- // Defensive floor: when both groups are non-empty the cross product is
46
- // non-empty, so an empty `mergedGroup` means every merge *failed* (an
47
- // unmergeable constraint in `secondGroup`). Keep the un-merged `firstGroup`
48
- // rather than collapsing to an empty union. A genuinely empty input union
49
- // (`anyOf: []` → empty group) is left empty so `toSchemasV3` still throws.
50
- if (mergedGroup.length === 0 && firstGroup.length > 0 && secondGroup.length > 0) {
51
- return { [groupType]: firstGroup };
52
- }
53
45
  return {
54
46
  [groupType]: mergedGroup.flatMap(item => {
55
47
  if (!isRef(item) && Array.isArray(item[groupType])) {
@@ -95,9 +95,12 @@ const parseIntegerFormat = ({ format, context, parent, stackTrail }) => {
95
95
  return undefined;
96
96
  }
97
97
  if (!v.is(integerFormat, format)) {
98
+ // `format` is an open vocabulary; a value the IR's integerFormat can't
99
+ // hold is dropped. Recorded at `debug` — the dropped hint is
100
+ // informational, not a correctness issue.
98
101
  context.logIssue({
99
102
  key: 'format',
100
- level: 'warning',
103
+ level: 'debug',
101
104
  message: `Invalid format: ${format}`,
102
105
  parent,
103
106
  stackTrail,
@@ -95,9 +95,12 @@ const parseNumberFormat = ({ format, context, parent, stackTrail }) => {
95
95
  return undefined;
96
96
  }
97
97
  if (!v.is(numberFormat, format)) {
98
+ // `format` is an open vocabulary; a value the IR's numberFormat can't
99
+ // hold (e.g. `decimal`) is dropped. Recorded at `debug` — the dropped
100
+ // hint is informational, not a correctness issue.
98
101
  context.logIssue({
99
102
  key: 'format',
100
- level: 'warning',
103
+ level: 'debug',
101
104
  message: `Invalid format: ${format}`,
102
105
  parent,
103
106
  stackTrail,
@@ -1 +1 @@
1
- {"version":3,"file":"toOperationsV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/operation/toOperationsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO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,EAAE,MAAM,gCAAgC,CAAA;AAEhE,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,GAAG,SAAS,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,aAAa,EAAE,aAAa,CAAA;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAOD,eAAO,MAAM,aAAa,GAAI,mDAK3B,iBAAiB,KAAG,YAuEtB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,SAAS,CAAC,WAAW,CAAA;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,gCAI5B,kBAAkB,KAAG,YAAY,EA6EnC,CAAA"}
@@ -11,7 +11,11 @@ import { toExternalDocs } from '../externalDocs/toExternalDocs.js';
11
11
  import { toOptionalServersV3 } from '../server/toServerV3.js';
12
12
  export const toOperationV3 = ({ operation, operationInfo, stackTrail, context }) => {
13
13
  const { method, path, pathItem } = operationInfo;
14
- const { operationId, tags, summary, description, parameters, requestBody, responses, deprecated, security, externalDocs, servers, ...skipped } = operation;
14
+ const { operationId, tags, summary, description, parameters, requestBody, responses, deprecated, security, externalDocs, servers,
15
+ // Callbacks are a deliberate non-goal (no out-of-band callback codegen).
16
+ // Pull it out so it is dropped silently instead of warned as an
17
+ // unexpected property on every operation that declares one.
18
+ callbacks: _callbacks, ...skipped } = operation;
15
19
  const extensionFields = toSpecificationExtensionsV3({
16
20
  skipped,
17
21
  parent: operation,
@@ -1 +1 @@
1
- {"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/schema/toSchemasV3.ts"],"names":[],"mappings":"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AAA;AAED,eAAO,MAAM,mBAAmB,GAAI,kCAIjC,uBAAuB,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,SAM3E,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAA;IAC1D,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AA0CD,eAAO,MAAM,UAAU,GAAI,iCAIxB,cAAc,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CA6P9C,CAAA;AA+CD,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAA;IACtE,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,iCAIhC,sBAAsB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAM1D,CAAA"}
@@ -73,8 +73,37 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
73
73
  if (isRef(schema)) {
74
74
  return toRefV31({ ref: schema, refType: 'schema', stackTrail, context });
75
75
  }
76
+ // OpenAPI `not` has no faithful TypeScript representation: a generated type
77
+ // that ignored it would *widen* the contract (accepting shapes the schema
78
+ // forbids). Refuse the schema rather than emit a type that lies. The throw
79
+ // is isolated by `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers
80
+ // of this schema are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
81
+ if ('not' in schema) {
82
+ throw new Error('Schema uses unsupported "not" keyword');
83
+ }
76
84
  if ('allOf' in schema && Array.isArray(schema.allOf)) {
77
85
  return stackTrail.trace('allOf', st => {
86
+ // A single-member allOf collapses to its sole member — the value must
87
+ // satisfy exactly that one schema. When the member is a `$ref`, keep it
88
+ // LAZY (as an OasRef) rather than resolving + merging its target: a
89
+ // `{ allOf: [{$ref: self}], nullable: true }` (a nullable reference
90
+ // written as a one-member allOf — common in real specs) is
91
+ // self-referential, and eagerly resolving it would not terminate. The
92
+ // ref resolves at use time like every other ref. This mirrors the
93
+ // single-member oneOf/anyOf handling below.
94
+ const { allOf, ...value } = schema;
95
+ const members = allOf ?? [];
96
+ if (members.length === 1) {
97
+ const [member] = members;
98
+ if (isRef(member) && value.nullable) {
99
+ return toRefV31({ ref: member, refType: 'schema', nullable: true, stackTrail: st, context });
100
+ }
101
+ return toSchemaV3({
102
+ schema: collapseSingleMember(value, member),
103
+ stackTrail: st,
104
+ context
105
+ });
106
+ }
78
107
  const merged = mergeIntersection({
79
108
  schema,
80
109
  getRef: toGetRef(context.documentObject)
@@ -185,8 +214,13 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
185
214
  }
186
215
  // Otherwise cases
187
216
  if (possibleObject(schema)) {
217
+ // 3.0 requires `type`, so its absence is a real (if benign) deviation —
218
+ // recorded at `debug` rather than `warning`: `properties` makes the
219
+ // intent unambiguous and inferring `object` is reliable, so it is noise
220
+ // in the default view but worth keeping in the record. (The v3-1 parser
221
+ // is silent here — type-less is valid in 3.1.)
188
222
  context.logIssueNoKey({
189
- level: 'warning',
223
+ level: 'debug',
190
224
  message: 'Object has "properties" property, but is missing type="object" property',
191
225
  parent: schema,
192
226
  stackTrail,
@@ -1 +1 @@
1
- {"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/string/toString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAQzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE;;GAEG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,SAAS,OAAO,GAAG,SAAS,EAAE,wEAQlE,kBAAkB,CAAC,QAAQ,CAAC,KAAG,SAAS,CAAC,QAAQ,CAoDnD,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { OasString } from '../../../oas/string/String.js';
2
2
  import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
3
- import { oasStringData, stringFormat } from '../../../oas/string/string-types.js';
3
+ import { oasStringData } from '../../../oas/string/string-types.js';
4
4
  import * as v from 'valibot';
5
5
  import { parseNullable } from '../_helpers/parseNullable.js';
6
6
  import { parseEnum } from '../_helpers/parseEnum.js';
@@ -186,16 +186,9 @@ export const toParsedString = ({ context, nullable, example, enums, defaultValue
186
186
  stackTrail,
187
187
  parentType: 'schema:string'
188
188
  });
189
- if (format && !v.is(stringFormat, format)) {
190
- context.logIssue({
191
- key: 'format',
192
- level: 'warning',
193
- message: `Unexpected format: ${format}`,
194
- parent: value,
195
- stackTrail,
196
- type: 'UNEXPECTED_FORMAT'
197
- });
198
- }
189
+ // `format` is an open vocabulary — custom string formats (e.g. `decimal`,
190
+ // `utc_datetime`) are spec-legal. The value is preserved on the OasString
191
+ // below, so an unrecognised format is passed through, not warned.
199
192
  return context.withStackTrail(stackTrail, () => new OasString({
200
193
  title,
201
194
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"decompose-union.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/_merge-all-of/decompose-union.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAQ/D,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,cAAc,EAAE,YAAY,CAAA;IAC5B,UAAU,EAAE,CAAC,YAAY,GAAG,eAAe,CAAC,EAAE,CAAA;IAC9C,aAAa,EAAE,YAAY,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,cAAc,GAAI,uBAAuB,kBAAkB,KAAG,oBA6C1E,CAAA"}
1
+ {"version":3,"file":"decompose-union.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/_merge-all-of/decompose-union.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAQ/D,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,cAAc,EAAE,YAAY,CAAA;IAC5B,UAAU,EAAE,CAAC,YAAY,GAAG,eAAe,CAAC,EAAE,CAAA;IAC9C,aAAa,EAAE,YAAY,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,cAAc,GAAI,uBAAuB,kBAAkB,KAAG,oBA2C1E,CAAA"}
@@ -1,7 +1,6 @@
1
1
  // Convert a schema object into an array of schemas that can be merged iteratively into a new schema
2
2
  export const decomposeUnion = ({ schema, groupType }) => {
3
3
  if (!schema[groupType]) {
4
- console.log('NO GROUP TYPE', JSON.stringify(schema, null, 2));
5
4
  return {
6
5
  beforeExcluded: {},
7
6
  decomposed: [schema],
@@ -38,15 +37,13 @@ export const decomposeUnion = ({ schema, groupType }) => {
38
37
  };
39
38
  return result;
40
39
  };
41
- // Kept on the union (via beforeExcluded/afterExcluded) rather than
42
- // cross-product-merged into each member. Two reasons a key lands here:
43
- // - Union-level metadata: merging it *into* a member resolves `$ref`
44
- // members (to merge the metadata in), losing their names — `toUnion`
45
- // already captures this metadata on the union itself.
46
- // - Non-distributable constraints (`not`): they have no per-member meaning
47
- // and `mergeSchemasOrRefs` cannot merge them, so distributing them throws
48
- // for every member and collapses the union to an empty array. TypeScript
49
- // can't model `not` anyway, so it rides the union wrapper, ignored.
40
+ // Union-level keys: kept on the union (via beforeExcluded/afterExcluded)
41
+ // rather than cross-product-merged into each member. Merging a metadata key
42
+ // *into* a member would resolve `$ref` members (to merge it in), losing their
43
+ // names — `toUnion` already captures these on the union itself.
44
+ // (`not` is deliberately NOT excluded here — it has no faithful TypeScript
45
+ // representation, so a schema using it is refused upstream in `toSchemaV3`
46
+ // rather than silently dropped from the union.)
50
47
  const excludedProperties = [
51
48
  'discriminator',
52
49
  'default',
@@ -57,8 +54,7 @@ const excludedProperties = [
57
54
  'examples',
58
55
  'readOnly',
59
56
  'writeOnly',
60
- 'deprecated',
61
- 'not'
57
+ 'deprecated'
62
58
  ];
63
59
  const exclude = (entries) => {
64
60
  return entries.reduce((acc, [key, value]) => {
@@ -1 +1 @@
1
- {"version":3,"file":"merge-union.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/_merge-all-of/merge-union.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI3E,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,+BAA+B,cAAc,KAAG,iBAiC1E,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,sCAK/B,qBAAqB,KAAG,YAkC1B,CAAA"}
1
+ {"version":3,"file":"merge-union.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/_merge-all-of/merge-union.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI3E,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,+BAA+B,cAAc,KAAG,iBAiC1E,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,sCAK/B,qBAAqB,KAAG,YAyB1B,CAAA"}
@@ -42,14 +42,6 @@ export const mergeCrossProduct = ({ first, second, getRef, groupType }) => {
42
42
  }
43
43
  })
44
44
  .filter(item => item !== undefined);
45
- // Defensive floor: when both groups are non-empty the cross product is
46
- // non-empty, so an empty `mergedGroup` means every merge *failed* (an
47
- // unmergeable constraint in `secondGroup`). Keep the un-merged `firstGroup`
48
- // rather than collapsing to an empty union. A genuinely empty input union
49
- // (`anyOf: []` → empty group) is left empty so `toSchemasV3` still throws.
50
- if (mergedGroup.length === 0 && firstGroup.length > 0 && secondGroup.length > 0) {
51
- return { [groupType]: firstGroup };
52
- }
53
45
  return {
54
46
  [groupType]: mergedGroup.flatMap(item => {
55
47
  if (!isRef(item) && Array.isArray(item[groupType])) {
@@ -95,9 +95,12 @@ const parseIntegerFormat = ({ format, context, parent, stackTrail }) => {
95
95
  return undefined;
96
96
  }
97
97
  if (!v.is(integerFormat, format)) {
98
+ // `format` is an open vocabulary; a value the IR's integerFormat can't
99
+ // hold is dropped. Recorded at `debug` — the dropped hint is
100
+ // informational, not a correctness issue.
98
101
  context.logIssue({
99
102
  key: 'format',
100
- level: 'warning',
103
+ level: 'debug',
101
104
  message: `Invalid format: ${format}`,
102
105
  parent,
103
106
  stackTrail,
@@ -95,9 +95,12 @@ const parseNumberFormat = ({ format, context, parent, stackTrail }) => {
95
95
  return undefined;
96
96
  }
97
97
  if (!v.is(numberFormat, format)) {
98
+ // `format` is an open vocabulary; a value the IR's numberFormat can't
99
+ // hold (e.g. `decimal`) is dropped. Recorded at `debug` — the dropped
100
+ // hint is informational, not a correctness issue.
98
101
  context.logIssue({
99
102
  key: 'format',
100
- level: 'warning',
103
+ level: 'debug',
101
104
  message: `Invalid format: ${format}`,
102
105
  parent,
103
106
  stackTrail,
@@ -1 +1 @@
1
- {"version":3,"file":"toOperationsV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/operation/toOperationsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAItE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAOpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,GAAG,SAAS,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,aAAa,EAAE,aAAa,CAAA;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAOD,eAAO,MAAM,aAAa,GAAI,mDAK3B,iBAAiB,KAAG,YAmEtB,CAAA;A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AM,cAAc,GAAI,gCAI5B,kBAAkB,KAAG,YAAY,EAiFnC,CAAA"}
@@ -11,7 +11,11 @@ import { toExternalDocs } from '../externalDocs/toExternalDocs.js';
11
11
  import { toOptionalServersV3 } from '../server/toServerV3.js';
12
12
  export const toOperationV3 = ({ operation, operationInfo, stackTrail, context }) => {
13
13
  const { method, path, pathItem } = operationInfo;
14
- const { operationId, tags, summary, description, parameters, requestBody, responses, deprecated, security, externalDocs, servers, ...skipped } = operation;
14
+ const { operationId, tags, summary, description, parameters, requestBody, responses, deprecated, security, externalDocs, servers,
15
+ // Callbacks are a deliberate non-goal (no out-of-band callback codegen).
16
+ // Pull it out so it is dropped silently instead of warned as an
17
+ // unexpected property on every operation that declares one.
18
+ callbacks: _callbacks, ...skipped } = operation;
15
19
  const extensionFields = toSpecificationExtensionsV3({
16
20
  skipped,
17
21
  parent: operation,
@@ -1 +1 @@
1
- {"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAarD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;IAC3E,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,kCAIzB,eAAe,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,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AgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,iCAIhC,sBAAsB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAM1D,CAAA"}
@@ -239,12 +239,41 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
239
239
  if (isRef(schema)) {
240
240
  return toRefV31({ ref: schema, refType: 'schema', stackTrail, context });
241
241
  }
242
+ // OpenAPI `not` has no faithful TypeScript representation: a generated type
243
+ // that ignored it would *widen* the contract (accepting shapes the schema
244
+ // forbids). Refuse the schema rather than emit a type that lies. The throw
245
+ // is isolated by `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers
246
+ // of this schema are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
247
+ if ('not' in schema) {
248
+ throw new Error('Schema uses unsupported "not" keyword');
249
+ }
242
250
  const normalized = normalizeSchemaShape(schema);
243
251
  if (normalized !== schema) {
244
252
  return toSchemaV3({ schema: normalized, stackTrail, context });
245
253
  }
246
254
  if ('allOf' in schema && Array.isArray(schema.allOf)) {
247
255
  return stackTrail.trace('allOf', st => {
256
+ // A single-member allOf collapses to its sole member — the value must
257
+ // satisfy exactly that one schema. When the member is a `$ref`, keep it
258
+ // LAZY (as an OasRef) rather than resolving + merging its target: a
259
+ // `{ allOf: [{$ref: self}], nullable: true }` (a nullable reference
260
+ // written as a one-member allOf — common in real specs) is
261
+ // self-referential, and eagerly resolving it would not terminate. The
262
+ // ref resolves at use time like every other ref. Mirrors the
263
+ // single-member oneOf/anyOf handling below.
264
+ const { allOf, ...value } = schema;
265
+ const members = allOf ?? [];
266
+ if (members.length === 1) {
267
+ const [member] = members;
268
+ if (isRef(member) && value.nullable) {
269
+ return toRefV31({ ref: member, refType: 'schema', nullable: true, stackTrail: st, context });
270
+ }
271
+ return toSchemaV3({
272
+ schema: collapseSingleMember(value, member),
273
+ stackTrail: st,
274
+ context
275
+ });
276
+ }
248
277
  const merged = mergeIntersection({
249
278
  schema,
250
279
  getRef: toGetRef(context.documentObject)
@@ -367,13 +396,11 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
367
396
  }
368
397
  // Otherwise cases
369
398
  if (possibleObject(schema)) {
370
- context.logIssueNoKey({
371
- level: 'warning',
372
- message: 'Object has "properties" property, but is missing type="object" property',
373
- parent: schema,
374
- stackTrail,
375
- type: 'MISSING_OBJECT_TYPE'
376
- });
399
+ // In 3.1 `type` is optional, so a schema with `properties` and no `type`
400
+ // is a normal, valid object schema — inferring `object` is the expected
401
+ // reading, not a deviation, so it is silent. (The v3-0 parser keeps the
402
+ // MISSING_OBJECT_TYPE warning: 3.0 requires `type`, so its absence there
403
+ // is a real signal.)
377
404
  return toObject({
378
405
  value: {
379
406
  ...schema,
@@ -1 +1 @@
1
- {"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/string/toString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAQzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,wEAAwE;IACxE,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,kCAAkC;IAClC,UAAU,EAAE,UAAU,CAAA;IACtB,iEAAiE;IACjE,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,eAAO,MAAM,QAAQ,GAAI,gCAAgC,YAAY,KAAG,SAwDvE,CAAA;AAED,KAAK,kBAAkB,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAC9D,KAAK,EAAE,IAAI,CAAC,S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AAgB,CAAA;CAC1B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,eAAO,MAAM,QAAQ,GAAI,gCAAgC,YAAY,KAAG,SAwDvE,CAAA;AAED,KAAK,kBAAkB,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAC9D,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;IACjF,OAAO,EAAE,gBAAgB,CAAA;IACzB,QAAQ,EAAE,QAAQ,CAAA;IAClB,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;IAC/E,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;IACnF,YAAY,EAAE,QAAQ,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;IACpF,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,SAAS,OAAO,GAAG,SAAS,EAAE,wEAQlE,kBAAkB,CAAC,QAAQ,CAAC,KAAG,SAAS,CAAC,QAAQ,CAoDnD,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { OasString } from '../../../oas/string/String.js';
2
2
  import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
3
- import { oasStringData, stringFormat } from '../../../oas/string/string-types.js';
3
+ import { oasStringData } from '../../../oas/string/string-types.js';
4
4
  import * as v from 'valibot';
5
5
  import { parseNullable } from '../_helpers/parseNullable.js';
6
6
  import { parseEnum } from '../_helpers/parseEnum.js';
@@ -186,16 +186,9 @@ export const toParsedString = ({ context, nullable, example, enums, defaultValue
186
186
  stackTrail,
187
187
  parentType: 'schema:string'
188
188
  });
189
- if (format && !v.is(stringFormat, format)) {
190
- context.logIssue({
191
- key: 'format',
192
- level: 'warning',
193
- message: `Unexpected format: ${format}`,
194
- parent: value,
195
- stackTrail,
196
- type: 'UNEXPECTED_FORMAT'
197
- });
198
- }
189
+ // `format` is an open vocabulary — custom string formats (e.g. `decimal`,
190
+ // `utc_datetime`) are spec-legal. The value is preserved on the OasString
191
+ // below, so an unrecognised format is passed through, not warned.
199
192
  return context.withStackTrail(stackTrail, () => new OasString({
200
193
  title,
201
194
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../src/types/Manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,OAAO,sBAAsB,CAAC;AAG9B,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAW,KAAK,OAAO,EAAE,KAAK,OAAO,EAAW,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAG1D,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA8C5B,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAIvD,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAA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AAC,aAAa,CAAC,aAAa,CAIvD,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,aAAa,CAAC,WAAW,CAGnD,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,OAAO,EAAE,WAAW,CAAA;IACpB;;;;;OAKG;IACH,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,aAAa,CAAC,eAAe,CAY3D,CAAA"}
@@ -99,6 +99,13 @@ const parseIssue = v.variant('protocol', [
99
99
  type: oasIssueType,
100
100
  location: v.string(),
101
101
  message: v.string()
102
+ }),
103
+ v.object({
104
+ protocol: v.literal('oas'),
105
+ level: v.literal('debug'),
106
+ type: oasIssueType,
107
+ location: v.string(),
108
+ message: v.string()
102
109
  })
103
110
  ]),
104
111
  v.variant('level', [
@@ -116,6 +123,13 @@ const parseIssue = v.variant('protocol', [
116
123
  type: gqlIssueType,
117
124
  location: v.string(),
118
125
  message: v.string()
126
+ }),
127
+ v.object({
128
+ protocol: v.literal('gql'),
129
+ level: v.literal('debug'),
130
+ type: gqlIssueType,
131
+ location: v.string(),
132
+ message: v.string()
119
133
  })
120
134
  ])
121
135
  ]);
@@ -49,9 +49,9 @@
49
49
  * @module Settings
50
50
  */
51
51
  import "../_dnt.polyfills.js";
52
- import { type GeneratorEnrichments } from './Enrichments.js';
53
- import * as v from 'valibot';
54
- import { type Method } from './Method.js';
52
+ import { type GeneratorEnrichments } from "./Enrichments.js";
53
+ import * as v from "valibot";
54
+ import { type Method } from "./Method.js";
55
55
  /**
56
56
  * Valibot schema for {@link ModulePackage}.
57
57
  *
@@ -430,6 +430,13 @@ export type ClientSettings = {
430
430
  * in v1. See {@link AnchorsSettings}.
431
431
  */
432
432
  anchors?: AnchorsSettings;
433
+ /**
434
+ * Preview input-matcher discovery directories (project-root relative, e.g.
435
+ * `src/fields`, `src/inputs`). A preview/hub concern: the generation engine
436
+ * ignores it. Declared here so the CLI preserves it when reading `client.json`
437
+ * and carries it through `skmtc push` to the hub.
438
+ */
439
+ inputDirs?: string[];
433
440
  };
434
441
  /**
435
442
  * Configuration for SKMTC client with optional project identification.
@@ -442,6 +449,12 @@ export type SkmtcClientConfig = {
442
449
  serverUrl?: string;
443
450
  /** Optional project identifier for organizational contexts */
444
451
  projectKey?: string;
452
+ /**
453
+ * skmtc-hub push destination in `@<account>/<slug>` form (the account may be
454
+ * a user or an org) — the `skmtc push` target, analogous to a git remote.
455
+ * Ignored by `skmtc generate`; consumed only by `skmtc push`.
456
+ */
457
+ project?: string;
445
458
  /** Optional schema path or url for OpenAPI schema */
446
459
  source?: string;
447
460
  /** Client settings for customizing generation behavior */
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/types/Settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,OAAO,sBAAsB,CAAC;AAG9B,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAClF,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAU,KAAK,MAAM,EAAE,MA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