Skip to content
Reference

Deprecations

Every deprecated Kubb v5 API, the package it ships in, and what to use instead before Kubb v6 removes it.

Kubb v6 removes every API on this page. Each one still works in v5. Move to the replacement before you upgrade.

@kubb/core

DeprecatedUse instead
definePlugindefineExtension with kind: 'plugin'
defineParserdefineExtension with kind: 'parser'
createAdapterdefineExtension with kind: 'adapter'
ctx.driver in plugin hooksschemas, getPlugin and memo
driver.getResolver(pluginName)ctx.getResolver(pluginName) in a template, or getResolver(pluginName) from kubb/kit
addGenerator, setResolver, setMacros, addMacro, createResolver, defineResolver, defineGenerator, toFilePath, Resolver from @kubb/coreThe same names from kubb/kit

@kubb/kit

DeprecatedUse instead
definePlugindefineExtension with kind: 'plugin'
defineGeneratordefineTemplate
addGeneratordefineTemplate and addTemplate
setMacrosaddMacro(...macros)
Generator typeTemplate with defineTemplate and addTemplate
camelCasecasing.camel
pascalCasecasing.pascal
extractRefNameast.ref.getName
syncSchemaRefast.ref.mergeSchema
isStringTypeast.schema.is(node, 'string')
macroSimplifyUnionmacroDedupeUnion

@kubb/ast

DeprecatedUse instead
isBareRefast.ref.isAlias
mergeRefWithSchemaast.ref.mergeSchema
refName, resolveRefNameast.ref.getName
resolveRefast.ref.getSchema
collectImportedRefNamesast.graph.getImportedNames
collectSchemaRefsast.graph.getRefNames
collectUsedSchemaNamesast.graph.getUsedNames
findCircularSchemasast.graph.getCircularNames
getSchemaLiteralValuesast.schema.getLiterals
inferDiscriminatorPropertyNameast.schema.inferDiscriminator
resolveSchemaPropertiesast.schema.findProperties
isHttpOperationNodeast.http.isOperation
collect, collectSyncast.node.collect
optionalityast.schema.applyOptionality
extractStringsFromNodesast.node.getText
compareEnforceast.macro.compareOrder
applyMacrosast.macro.apply
createPrintercreatePrinter from @kubb/kit
defineMacrodefineMacro from @kubb/kit
nodeKindsast.node.kinds
schemaTypesast.schema.types
findSchemaast.schema.find
narrowSchemaast.schema.narrow
transformast.node.transform
inlineFilesast.file.inline
ast.schema.isStringast.schema.is(node, 'string')
followRefs option of findSchemafollow: ['ref']
ImportNode namenames
ImportNode and ExportNode isTypeOnlyspace: 'type' on each name
ImportNode isNameSpace, ExportNode asAlias{ name: '*', alias } in names
ExportNode namenames
SourceNode isTypeOnlyspace: 'type'
SourceNode isExportable, isIndexableexport
SourceNode inlineinline on the file
ObjectSchemaNode minProperties, maxPropertiesmin, max
NumberSchemaNode exclusiveMinimum, exclusiveMaximumexclusive.min, exclusive.max

@kubb/renderer-jsx

DeprecatedUse instead
File.SourceCode or Raw, or Const, Type or Function directly in File
inline prop on Const, Type and Functioninline on the File

@kubb/parser-ts

DeprecatedUse instead
TsNode (compiler nodes passed to print)Printed strings