@kubb/plugin-oas 3.0.0-alpha.29 → 3.0.0-alpha.30
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-6UWOTOZJ.cjs → chunk-4H2KTGZM.cjs} +3 -3
- package/dist/{chunk-6UWOTOZJ.cjs.map → chunk-4H2KTGZM.cjs.map} +1 -1
- package/dist/{chunk-TRA5BTWI.js → chunk-ABIWUCV7.js} +3 -3
- package/dist/{chunk-TRA5BTWI.js.map → chunk-ABIWUCV7.js.map} +1 -1
- package/dist/{chunk-FJAEFZB3.cjs → chunk-QT6ZFRNJ.cjs} +3 -3
- package/dist/{chunk-FJAEFZB3.cjs.map → chunk-QT6ZFRNJ.cjs.map} +1 -1
- package/dist/{chunk-BY4ENSC5.js → chunk-V2JO6RHI.js} +3 -3
- package/dist/{chunk-BY4ENSC5.js.map → chunk-V2JO6RHI.js.map} +1 -1
- package/dist/generators.cjs +2 -2
- package/dist/generators.js +1 -1
- package/dist/hooks.cjs +6 -6
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +5 -5
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +10 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -15
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/OperationGenerator.ts +0 -8
- package/src/SchemaGenerator.ts +1 -1
- package/src/generators/jsonGenerator.ts +1 -1
- package/src/hooks/useOperationManager.ts +3 -3
- package/src/hooks/useSchemaManager.ts +3 -3
- package/src/plugin.ts +0 -2
|
@@ -48,7 +48,7 @@ type UseOperationManagerResult = {
|
|
|
48
48
|
prefix?: string
|
|
49
49
|
suffix?: string
|
|
50
50
|
pluginKey?: Plugin['key']
|
|
51
|
-
|
|
51
|
+
extname?: KubbFile.Extname
|
|
52
52
|
tag?: string
|
|
53
53
|
},
|
|
54
54
|
) => KubbFile.File<FileMeta>
|
|
@@ -108,12 +108,12 @@ export function useOperationManager(): UseOperationManagerResult {
|
|
|
108
108
|
//TODO replace tag with group
|
|
109
109
|
const getFile: UseOperationManagerResult['getFile'] = (
|
|
110
110
|
operation,
|
|
111
|
-
{ prefix, suffix, pluginKey = plugin.key, tag = operation.getTags().at(0)?.name,
|
|
111
|
+
{ prefix, suffix, pluginKey = plugin.key, tag = operation.getTags().at(0)?.name, extname = '.ts' } = {},
|
|
112
112
|
) => {
|
|
113
113
|
const name = getName(operation, { type: 'file', pluginKey, prefix, suffix })
|
|
114
114
|
const file = pluginManager.getFile({
|
|
115
115
|
name,
|
|
116
|
-
|
|
116
|
+
extname,
|
|
117
117
|
pluginKey,
|
|
118
118
|
options: { type: 'file', pluginKey, tag },
|
|
119
119
|
})
|
|
@@ -14,7 +14,7 @@ type FileMeta = FileMetaBase & {
|
|
|
14
14
|
|
|
15
15
|
type UseSchemaManagerResult = {
|
|
16
16
|
getName: (name: string, params: { pluginKey?: Plugin['key']; type: ResolveNameParams['type'] }) => string
|
|
17
|
-
getFile: (name: string, params?: { pluginKey?: Plugin['key']; mode?: Mode;
|
|
17
|
+
getFile: (name: string, params?: { pluginKey?: Plugin['key']; mode?: Mode; extname?: KubbFile.Extname; tag?: string }) => KubbFile.File<FileMeta>
|
|
18
18
|
getImports: (tree: Array<Schema>) => Array<KubbFile.Import>
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -32,12 +32,12 @@ export function useSchemaManager(): UseSchemaManagerResult {
|
|
|
32
32
|
})
|
|
33
33
|
}
|
|
34
34
|
//TODO replace tag with group
|
|
35
|
-
const getFile: UseSchemaManagerResult['getFile'] = (name, { mode = 'split', pluginKey = plugin.key,
|
|
35
|
+
const getFile: UseSchemaManagerResult['getFile'] = (name, { mode = 'split', pluginKey = plugin.key, extname = '.ts', tag } = {}) => {
|
|
36
36
|
const resolvedName = mode === 'single' ? '' : getName(name, { type: 'file', pluginKey })
|
|
37
37
|
|
|
38
38
|
const file = pluginManager.getFile({
|
|
39
39
|
name: resolvedName,
|
|
40
|
-
|
|
40
|
+
extname,
|
|
41
41
|
pluginKey,
|
|
42
42
|
options: { type: 'file', pluginKey, tag },
|
|
43
43
|
})
|