@kubb/plugin-ts 3.6.1 → 3.6.2
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.
- package/dist/{chunk-46QPECUV.cjs → chunk-HODPITUW.cjs} +11 -11
- package/dist/{chunk-46QPECUV.cjs.map → chunk-HODPITUW.cjs.map} +1 -1
- package/dist/{chunk-TBG2ENOI.cjs → chunk-ISG4ADLH.cjs} +5 -4
- package/dist/chunk-ISG4ADLH.cjs.map +1 -0
- package/dist/{chunk-AYA2SL3G.js → chunk-PM4CWXK4.js} +3 -3
- package/dist/{chunk-AYA2SL3G.js.map → chunk-PM4CWXK4.js.map} +1 -1
- package/dist/{chunk-2WAGTL4H.js → chunk-WBVEQ3D4.js} +5 -4
- package/dist/chunk-WBVEQ3D4.js.map +1 -0
- package/dist/components.cjs +3 -3
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +1 -1
- package/dist/generators.cjs +4 -4
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{types-D1yD2jvM.d.cts → types-DOx63BPA.d.cts} +1 -1
- package/dist/{types-D1yD2jvM.d.ts → types-DOx63BPA.d.ts} +1 -1
- package/package.json +10 -10
- package/src/generators/__snapshots__/createPet.ts +7 -2
- package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +7 -2
- package/src/generators/__snapshots__/createPetWithUnknownTypeVoid.ts +38 -0
- package/src/parser.ts +1 -0
- package/src/types.ts +1 -1
- package/dist/chunk-2WAGTL4H.js.map +0 -1
- package/dist/chunk-TBG2ENOI.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ type Options = {
|
|
|
55
55
|
* Which type to use when the Swagger/OpenAPI file is not providing more information.
|
|
56
56
|
* @default 'any'
|
|
57
57
|
*/
|
|
58
|
-
unknownType?: 'any' | 'unknown';
|
|
58
|
+
unknownType?: 'any' | 'unknown' | 'void';
|
|
59
59
|
/**
|
|
60
60
|
* Choose what to use as mode for an optional value.
|
|
61
61
|
* @examples 'questionToken': type?: string
|
|
@@ -55,7 +55,7 @@ type Options = {
|
|
|
55
55
|
* Which type to use when the Swagger/OpenAPI file is not providing more information.
|
|
56
56
|
* @default 'any'
|
|
57
57
|
*/
|
|
58
|
-
unknownType?: 'any' | 'unknown';
|
|
58
|
+
unknownType?: 'any' | 'unknown' | 'void';
|
|
59
59
|
/**
|
|
60
60
|
* Choose what to use as mode for an optional value.
|
|
61
61
|
* @examples 'questionToken': type?: string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-ts",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.2",
|
|
4
4
|
"description": "Generator plugin-ts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zod",
|
|
@@ -58,20 +58,20 @@
|
|
|
58
58
|
"!/**/__tests__/**"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@kubb/core": "3.6.
|
|
62
|
-
"@kubb/fs": "3.6.
|
|
63
|
-
"@kubb/oas": "3.6.
|
|
64
|
-
"@kubb/parser-ts": "3.6.
|
|
65
|
-
"@kubb/plugin-oas": "3.6.
|
|
66
|
-
"@kubb/react": "3.6.
|
|
61
|
+
"@kubb/core": "3.6.2",
|
|
62
|
+
"@kubb/fs": "3.6.2",
|
|
63
|
+
"@kubb/oas": "3.6.2",
|
|
64
|
+
"@kubb/parser-ts": "3.6.2",
|
|
65
|
+
"@kubb/plugin-oas": "3.6.2",
|
|
66
|
+
"@kubb/react": "3.6.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/react": "^18.3.18",
|
|
70
70
|
"react": "^18.3.1",
|
|
71
71
|
"tsup": "^8.4.0",
|
|
72
|
-
"typescript": "^5.
|
|
73
|
-
"@kubb/config-ts": "3.6.
|
|
74
|
-
"@kubb/config-tsup": "3.6.
|
|
72
|
+
"typescript": "^5.8.2",
|
|
73
|
+
"@kubb/config-ts": "3.6.2",
|
|
74
|
+
"@kubb/config-tsup": "3.6.2"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@kubb/react": "^3.0.0"
|
|
@@ -8,6 +8,11 @@ export type CreatePets201 = error & {
|
|
|
8
8
|
name?: errorCode
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @description Accepted response
|
|
13
|
+
*/
|
|
14
|
+
export type CreatePets202 = any
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* @description unexpected error
|
|
13
18
|
*/
|
|
@@ -24,10 +29,10 @@ export type CreatePetsMutationRequest = {
|
|
|
24
29
|
tag: string
|
|
25
30
|
}
|
|
26
31
|
|
|
27
|
-
export type CreatePetsMutationResponse = createPets201
|
|
32
|
+
export type CreatePetsMutationResponse = createPets201 | createPets202
|
|
28
33
|
|
|
29
34
|
export type createPetsMutation = {
|
|
30
|
-
Response: createPets201
|
|
35
|
+
Response: createPets201 | createPets202
|
|
31
36
|
Request: createPetsMutationRequest
|
|
32
37
|
Errors: any
|
|
33
38
|
}
|
|
@@ -8,6 +8,11 @@ export type CreatePets201 = error & {
|
|
|
8
8
|
name?: errorCode
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @description Accepted response
|
|
13
|
+
*/
|
|
14
|
+
export type CreatePets202 = unknown
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* @description unexpected error
|
|
13
18
|
*/
|
|
@@ -24,10 +29,10 @@ export type CreatePetsMutationRequest = {
|
|
|
24
29
|
tag: string
|
|
25
30
|
}
|
|
26
31
|
|
|
27
|
-
export type CreatePetsMutationResponse = createPets201
|
|
32
|
+
export type CreatePetsMutationResponse = createPets201 | createPets202
|
|
28
33
|
|
|
29
34
|
export type createPetsMutation = {
|
|
30
|
-
Response: createPets201
|
|
35
|
+
Response: createPets201 | createPets202
|
|
31
36
|
Request: createPetsMutationRequest
|
|
32
37
|
Errors: any
|
|
33
38
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Null response
|
|
3
|
+
*/
|
|
4
|
+
export type CreatePets201 = error & {
|
|
5
|
+
/**
|
|
6
|
+
* @type object | undefined
|
|
7
|
+
*/
|
|
8
|
+
name?: errorCode
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @description Accepted response
|
|
13
|
+
*/
|
|
14
|
+
export type CreatePets202 = void
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @description unexpected error
|
|
18
|
+
*/
|
|
19
|
+
export type CreatePetsError = error
|
|
20
|
+
|
|
21
|
+
export type CreatePetsMutationRequest = {
|
|
22
|
+
/**
|
|
23
|
+
* @type string
|
|
24
|
+
*/
|
|
25
|
+
name: string
|
|
26
|
+
/**
|
|
27
|
+
* @type string
|
|
28
|
+
*/
|
|
29
|
+
tag: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type CreatePetsMutationResponse = createPets201 | createPets202
|
|
33
|
+
|
|
34
|
+
export type createPetsMutation = {
|
|
35
|
+
Response: createPets201 | createPets202
|
|
36
|
+
Request: createPetsMutationRequest
|
|
37
|
+
Errors: any
|
|
38
|
+
}
|
package/src/parser.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type ts from 'typescript'
|
|
|
8
8
|
export const typeKeywordMapper = {
|
|
9
9
|
any: () => factory.keywordTypeNodes.any,
|
|
10
10
|
unknown: () => factory.keywordTypeNodes.unknown,
|
|
11
|
+
void: () => factory.keywordTypeNodes.void,
|
|
11
12
|
number: () => factory.keywordTypeNodes.number,
|
|
12
13
|
integer: () => factory.keywordTypeNodes.number,
|
|
13
14
|
object: (nodes?: ts.TypeElement[]) => {
|
package/src/types.ts
CHANGED
|
@@ -55,7 +55,7 @@ export type Options = {
|
|
|
55
55
|
* Which type to use when the Swagger/OpenAPI file is not providing more information.
|
|
56
56
|
* @default 'any'
|
|
57
57
|
*/
|
|
58
|
-
unknownType?: 'any' | 'unknown'
|
|
58
|
+
unknownType?: 'any' | 'unknown' | 'void'
|
|
59
59
|
/**
|
|
60
60
|
* Choose what to use as mode for an optional value.
|
|
61
61
|
* @examples 'questionToken': type?: string
|