@kubb/plugin-ts 3.8.0 → 3.9.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 (67) hide show
  1. package/dist/{chunk-OJLHIBYC.js → chunk-45GERXQD.js} +47 -26
  2. package/dist/chunk-45GERXQD.js.map +1 -0
  3. package/dist/{chunk-YCJCRZF6.js → chunk-LEN5TPHR.js} +15 -13
  4. package/dist/chunk-LEN5TPHR.js.map +1 -0
  5. package/dist/{chunk-VBEBZKJX.cjs → chunk-LWIFDYGQ.cjs} +53 -32
  6. package/dist/chunk-LWIFDYGQ.cjs.map +1 -0
  7. package/dist/{chunk-OFELQKSZ.cjs → chunk-YOHDAJ4F.cjs} +15 -13
  8. package/dist/chunk-YOHDAJ4F.cjs.map +1 -0
  9. package/dist/components.cjs +3 -3
  10. package/dist/components.js +1 -1
  11. package/dist/generators.cjs +4 -4
  12. package/dist/generators.js +2 -2
  13. package/dist/index.cjs +4 -4
  14. package/dist/index.js +2 -2
  15. package/package.json +11 -11
  16. package/src/generators/__snapshots__/bodyUploadFileApiAssetsPost.ts +5 -0
  17. package/src/generators/__snapshots__/catTypeAsConst.ts +5 -0
  18. package/src/generators/__snapshots__/createPet.ts +5 -0
  19. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +5 -0
  20. package/src/generators/__snapshots__/createPetWithUnknownTypeVoid.ts +5 -0
  21. package/src/generators/__snapshots__/deletePet.ts +5 -0
  22. package/src/generators/__snapshots__/dogTypeAsConst.ts +5 -0
  23. package/src/generators/__snapshots__/enumAllOf.ts +5 -0
  24. package/src/generators/__snapshots__/enumArray.ts +5 -0
  25. package/src/generators/__snapshots__/enumArray20.ts +5 -0
  26. package/src/generators/__snapshots__/enumInObject.ts +5 -0
  27. package/src/generators/__snapshots__/enumItems.ts +5 -0
  28. package/src/generators/__snapshots__/enumNames.ts +5 -0
  29. package/src/generators/__snapshots__/enumNamesConst.ts +5 -0
  30. package/src/generators/__snapshots__/enumNamesLiteral.ts +5 -0
  31. package/src/generators/__snapshots__/enumNamesPascalConst.ts +5 -0
  32. package/src/generators/__snapshots__/enumNamesType.ts +5 -0
  33. package/src/generators/__snapshots__/enumNullableMember.ts +5 -0
  34. package/src/generators/__snapshots__/enumNullableType.ts +5 -0
  35. package/src/generators/__snapshots__/enumString.ts +5 -0
  36. package/src/generators/__snapshots__/enumVarNamesType.ts +5 -0
  37. package/src/generators/__snapshots__/fooBase.ts +5 -0
  38. package/src/generators/__snapshots__/fooNumber.ts +5 -0
  39. package/src/generators/__snapshots__/getPets.ts +5 -0
  40. package/src/generators/__snapshots__/mixedValueTypeConst.ts +5 -0
  41. package/src/generators/__snapshots__/nullConstNull.ts +5 -0
  42. package/src/generators/__snapshots__/numberValueConst.ts +5 -0
  43. package/src/generators/__snapshots__/petMapper.ts +5 -0
  44. package/src/generators/__snapshots__/petQuestionToken.ts +5 -0
  45. package/src/generators/__snapshots__/petQuestionTokenAndUndefined.ts +5 -0
  46. package/src/generators/__snapshots__/petUndefined.ts +5 -0
  47. package/src/generators/__snapshots__/pets.ts +5 -0
  48. package/src/generators/__snapshots__/petsInterface.ts +5 -0
  49. package/src/generators/__snapshots__/petsStoreAdvancedDiscriminator.ts +5 -0
  50. package/src/generators/__snapshots__/petsStoreDiscriminator.ts +5 -0
  51. package/src/generators/__snapshots__/petsStoreRef.ts +5 -0
  52. package/src/generators/__snapshots__/plainDateDate.ts +5 -0
  53. package/src/generators/__snapshots__/plainDateString.ts +5 -0
  54. package/src/generators/__snapshots__/plainEmail.ts +5 -0
  55. package/src/generators/__snapshots__/plainFile.ts +5 -0
  56. package/src/generators/__snapshots__/plainTimeDate.ts +5 -0
  57. package/src/generators/__snapshots__/plainUuid.ts +5 -0
  58. package/src/generators/__snapshots__/readOnly.ts +5 -0
  59. package/src/generators/__snapshots__/showPetById.ts +5 -0
  60. package/src/generators/__snapshots__/stringValueConst.ts +5 -0
  61. package/src/generators/oasGenerator.tsx +7 -1
  62. package/src/generators/typeGenerator.tsx +9 -2
  63. package/src/parser.ts +12 -8
  64. package/dist/chunk-OFELQKSZ.cjs.map +0 -1
  65. package/dist/chunk-OJLHIBYC.js.map +0 -1
  66. package/dist/chunk-VBEBZKJX.cjs.map +0 -1
  67. package/dist/chunk-YCJCRZF6.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-ts",
3
- "version": "3.8.0",
3
+ "version": "3.9.1",
4
4
  "description": "Generator plugin-ts",
5
5
  "keywords": [
6
6
  "zod",
@@ -12,11 +12,11 @@
12
12
  ],
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "git://github.com/kubb-labs/kubb.git",
15
+ "url": "https://github.com/kubb-labs/kubb.git",
16
16
  "directory": "packages/plugin-ts"
17
17
  },
18
18
  "license": "MIT",
19
- "author": "Stijn Van Hulle <stijn@stijnvanhulle.be",
19
+ "author": "stijnvanhulle",
20
20
  "sideEffects": false,
21
21
  "type": "module",
22
22
  "exports": {
@@ -58,20 +58,20 @@
58
58
  "!/**/__tests__/**"
59
59
  ],
60
60
  "dependencies": {
61
- "@kubb/core": "3.8.0",
62
- "@kubb/fs": "3.8.0",
63
- "@kubb/oas": "3.8.0",
64
- "@kubb/parser-ts": "3.8.0",
65
- "@kubb/plugin-oas": "3.8.0",
66
- "@kubb/react": "3.8.0"
61
+ "@kubb/core": "3.9.1",
62
+ "@kubb/fs": "3.9.1",
63
+ "@kubb/oas": "3.9.1",
64
+ "@kubb/parser-ts": "3.9.1",
65
+ "@kubb/plugin-oas": "3.9.1",
66
+ "@kubb/react": "3.9.1"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/react": "^18.3.20",
70
70
  "react": "^18.3.1",
71
71
  "tsup": "^8.4.0",
72
72
  "typescript": "^5.8.3",
73
- "@kubb/config-ts": "3.8.0",
74
- "@kubb/config-tsup": "3.8.0"
73
+ "@kubb/config-ts": "3.9.1",
74
+ "@kubb/config-tsup": "3.9.1"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@kubb/react": "^3.0.0"
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type bodyUploadFileApiAssetsPost = {
2
7
  /**
3
8
  * @type string, binary
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type cat = {
2
7
  /**
3
8
  * @type string, uuid
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  /**
2
7
  * @description Null response
3
8
  */
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  /**
2
7
  * @description Null response
3
8
  */
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  /**
2
7
  * @description Null response
3
8
  */
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type DeletePetsPetidMutationResponse = any
2
7
 
3
8
  export type deletePetsPetidMutation = {
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type dog = {
2
7
  /**
3
8
  * @type string, uuid
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumAllOfReasonEnum2 = {
2
7
  created_at: 'created_at',
3
8
  description: 'description',
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type EnumArrayEnum2 = 'NW' | 'NE' | 'SW' | 'SE'
2
7
 
3
8
  export type enumArray = EnumArrayEnum2[]
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumArrayIdentifierEnum2 = {
2
7
  NW: 'NW',
3
8
  NE: 'NE',
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumInObjectReasonEnum2 = {
2
7
  created_at: 'created_at',
3
8
  description: 'description',
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumItemsEnum2 = {
2
7
  created_at: 'created_at',
3
8
  description: 'description',
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export enum EnumNamesTypeEnum2 {
2
7
  'Pending' = 0,
3
8
  'Received' = 1,
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enum EnumNamesTypeEnum2 {
2
7
  'Pending' = 0,
3
8
  'Received' = 1,
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type EnumNamesTypeEnum2 = 0 | 1
2
7
 
3
8
  export type enumNamesType = EnumNamesTypeEnum2
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const EnumNamesTypeEnum2 = {
2
7
  Pending: 0,
3
8
  Received: 1,
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumNamesType = {
2
7
  Pending: 0,
3
8
  Received: 1,
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumNullableMemberEnum2 = {
2
7
  first: 'first',
3
8
  second: 'second',
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumNullableTypeEnum2 = {
2
7
  first: 'first',
3
8
  second: 'second',
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumStringEnum2 = {
2
7
  'created at': 'created at',
3
8
  description: 'description',
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const enumVarNamesTypeEnum2 = {
2
7
  Pending: 0,
3
8
  Received: 1,
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type FooBasetypeEnum2 = 'type-string' | 'type-number'
2
7
 
3
8
  export type fooBase = {
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type FooNumbertypeEnum2 = 'type-number'
2
7
 
3
8
  export type fooNumber = fooBase & {
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type ListPetsQueryParams = {
2
7
  /**
3
8
  * @description How many items to return at one time (max 100)
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  /**
2
7
  * @description This probably should fail miserably
3
8
  */
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  /**
2
7
  * @description The value of this keyword MAY be null.\nUse of this keyword is functionally equivalent to an \"enum\" (Section 6.1.2) with a single value.\nAn instance validates successfully against this keyword if its value is equal to the value of the keyword.\n
3
8
  */
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  /**
2
7
  * @description its value is equal to the value of the keyword
3
8
  */
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type pet = {
2
7
  /**
3
8
  * @type integer, int64
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type pet = {
2
7
  /**
3
8
  * @type integer, int64
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type pet = {
2
7
  /**
3
8
  * @type integer, int64
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type pet = {
2
7
  /**
3
8
  * @type integer, int64
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type pets = {
2
7
  /**
3
8
  * @type integer, int64
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type pets = {
2
7
  /**
3
8
  * @type integer, int64
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export const advancedTypeEnum2 = {
2
7
  enum: 'enum',
3
8
  range: 'range',
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  /**
2
7
  * @description A project is an analysis project. It has a name, an id, and has a dataset
3
8
  */
@@ -1 +1,6 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type pets = pet[]
@@ -1 +1,6 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type plainDate = Date
@@ -1 +1,6 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type plainDate = string
@@ -1 +1,6 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type plainEmail = string
@@ -1 +1,6 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type plainFile = Blob
@@ -1 +1,6 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type plainTime = Date
@@ -1 +1,6 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type plainUuid = string
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type demo = {
2
7
  /**
3
8
  * @type integer | undefined
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  export type ShowPetByIdPathParams = {
2
7
  /**
3
8
  * @description The id of the pet to retrieve
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
5
+
1
6
  /**
2
7
  * @description its value is equal to the value of the keyword
3
8
  */
@@ -20,7 +20,13 @@ export const oasGenerator = createReactGenerator<PluginTs>({
20
20
  const file = pluginManager.getFile({ name: 'oas', extname: '.ts', pluginKey })
21
21
 
22
22
  return (
23
- <File baseName={file.baseName} path={file.path} meta={file.meta} banner={getBanner({ oas, output })} footer={getFooter({ oas, output })}>
23
+ <File
24
+ baseName={file.baseName}
25
+ path={file.path}
26
+ meta={file.meta}
27
+ banner={getBanner({ oas, output, config: pluginManager.config })}
28
+ footer={getFooter({ oas, output })}
29
+ >
24
30
  <File.Import name={['Infer']} path="@kubb/oas" isTypeOnly />
25
31
 
26
32
  <OasType name={'oas'} typeName={'Oas'} api={oas.api} />
@@ -163,7 +163,7 @@ export const typeGenerator = createReactGenerator<PluginTs>({
163
163
  baseName={file.baseName}
164
164
  path={file.path}
165
165
  meta={file.meta}
166
- banner={getBanner({ oas, output: plugin.options.output })}
166
+ banner={getBanner({ oas, output: plugin.options.output, config: pluginManager.config })}
167
167
  footer={getFooter({ oas, output: plugin.options.output })}
168
168
  >
169
169
  {operationSchemas.map(mapOperationSchema)}
@@ -181,6 +181,7 @@ export const typeGenerator = createReactGenerator<PluginTs>({
181
181
  plugin: {
182
182
  options: { output },
183
183
  },
184
+ pluginManager,
184
185
  } = useApp<PluginTs>()
185
186
  const oas = useOas()
186
187
 
@@ -198,7 +199,13 @@ export const typeGenerator = createReactGenerator<PluginTs>({
198
199
  }
199
200
 
200
201
  return (
201
- <File baseName={type.file.baseName} path={type.file.path} meta={type.file.meta} banner={getBanner({ oas, output })} footer={getFooter({ oas, output })}>
202
+ <File
203
+ baseName={type.file.baseName}
204
+ path={type.file.path}
205
+ meta={type.file.meta}
206
+ banner={getBanner({ oas, output, config: pluginManager.config })}
207
+ footer={getFooter({ oas, output })}
208
+ >
202
209
  {mode === 'split' && imports.map((imp, index) => <File.Import key={index} root={type.file.path} path={imp.path} name={imp.name} isTypeOnly />)}
203
210
  <Type
204
211
  name={type.name}
package/src/parser.ts CHANGED
@@ -81,7 +81,6 @@ export const typeKeywordMapper = {
81
81
  type === 'string' ? factory.keywordTypeNodes.string : factory.createTypeReferenceNode(factory.createIdentifier('Date')),
82
82
  uuid: () => factory.keywordTypeNodes.string,
83
83
  url: () => factory.keywordTypeNodes.string,
84
- strict: undefined,
85
84
  default: undefined,
86
85
  and: (nodes?: ts.TypeNode[]) => {
87
86
  if (!nodes) {
@@ -118,6 +117,7 @@ export const typeKeywordMapper = {
118
117
  schema: undefined,
119
118
  catchall: undefined,
120
119
  name: undefined,
120
+ interface: undefined,
121
121
  } satisfies SchemaMapper<ts.Node | null | undefined>
122
122
 
123
123
  type ParserOptions = {
@@ -138,7 +138,7 @@ type ParserOptions = {
138
138
  mapper?: Record<string, ts.PropertySignature>
139
139
  }
140
140
 
141
- export function parse({ current, siblings }: SchemaTree, options: ParserOptions): ts.Node | null | undefined {
141
+ export function parse({ current, siblings, name }: SchemaTree, options: ParserOptions): ts.Node | null | undefined {
142
142
  const value = typeKeywordMapper[current.keyword as keyof typeof typeKeywordMapper]
143
143
 
144
144
  if (!value) {
@@ -147,17 +147,19 @@ export function parse({ current, siblings }: SchemaTree, options: ParserOptions)
147
147
 
148
148
  if (isKeyword(current, schemaKeywords.union)) {
149
149
  return typeKeywordMapper.union(
150
- current.args.map((schema) => parse({ parent: current, current: schema, siblings }, options)).filter(Boolean) as ts.TypeNode[],
150
+ current.args.map((schema) => parse({ parent: current, name: name, current: schema, siblings }, options)).filter(Boolean) as ts.TypeNode[],
151
151
  )
152
152
  }
153
153
 
154
154
  if (isKeyword(current, schemaKeywords.and)) {
155
- return typeKeywordMapper.and(current.args.map((schema) => parse({ parent: current, current: schema, siblings }, options)).filter(Boolean) as ts.TypeNode[])
155
+ return typeKeywordMapper.and(
156
+ current.args.map((schema) => parse({ parent: current, name: name, current: schema, siblings }, options)).filter(Boolean) as ts.TypeNode[],
157
+ )
156
158
  }
157
159
 
158
160
  if (isKeyword(current, schemaKeywords.array)) {
159
161
  return typeKeywordMapper.array(
160
- current.args.items.map((schema) => parse({ parent: current, current: schema, siblings }, options)).filter(Boolean) as ts.TypeNode[],
162
+ current.args.items.map((schema) => parse({ parent: current, name: name, current: schema, siblings }, options)).filter(Boolean) as ts.TypeNode[],
161
163
  )
162
164
  }
163
165
 
@@ -175,7 +177,7 @@ export function parse({ current, siblings }: SchemaTree, options: ParserOptions)
175
177
 
176
178
  if (isKeyword(current, schemaKeywords.tuple)) {
177
179
  return typeKeywordMapper.tuple(
178
- current.args.items.map((schema) => parse({ parent: current, current: schema, siblings }, options)).filter(Boolean) as ts.TypeNode[],
180
+ current.args.items.map((schema) => parse({ parent: current, name: name, current: schema, siblings }, options)).filter(Boolean) as ts.TypeNode[],
179
181
  )
180
182
  }
181
183
 
@@ -211,7 +213,9 @@ export function parse({ current, siblings }: SchemaTree, options: ParserOptions)
211
213
  const maxSchema = schemas.find((schema) => schema.keyword === schemaKeywords.max) as SchemaKeywordMapper['max'] | undefined
212
214
  const matchesSchema = schemas.find((schema) => schema.keyword === schemaKeywords.matches) as SchemaKeywordMapper['matches'] | undefined
213
215
 
214
- let type = schemas.map((schema) => parse({ parent: current, current: schema, siblings: schemas }, options)).filter(Boolean)[0] as ts.TypeNode
216
+ let type = schemas
217
+ .map((schema) => parse({ parent: current, name: name, current: schema, siblings: schemas }, options))
218
+ .filter(Boolean)[0] as ts.TypeNode
215
219
 
216
220
  if (isNullable) {
217
221
  type = factory.createUnionDeclaration({
@@ -258,7 +262,7 @@ export function parse({ current, siblings }: SchemaTree, options: ParserOptions)
258
262
  const additionalProperties = current.args?.additionalProperties?.length
259
263
  ? factory.createIndexSignature(
260
264
  current.args.additionalProperties
261
- .map((schema) => parse({ parent: current, current: schema, siblings }, options))
265
+ .map((schema) => parse({ parent: current, name: name, current: schema, siblings }, options))
262
266
  .filter(Boolean)
263
267
  .at(0) as ts.TypeNode,
264
268
  )