Skip to main content

API

@the-codegen-project/cliDocs


API

These are all the exposed types and functions when installing the CLI as a dependency.

Interfaces

InterfaceDescription
AsyncAPIDocumentInterface-
GenericCodegenContext-
LoadArgument-
ParameterRenderType-
PayloadRenderType-
RunGeneratorContext-
SingleFunctionRenderType-

Type Aliases

Type aliasDescription
Generators-
PresetTypes-
SupportedLanguages-
TheCodegenConfiguration-
TheCodegenConfigurationInternal-
TypeScriptChannelsGenerator-
TypeScriptClientGenerator-
TypescriptParametersGenerator-
TypeScriptPayloadGenerator-

Variables

VariableDescription
defaultCustomGenerator-
defaultTypeScriptChannelsGenerator-
defaultTypeScriptClientGenerator-
defaultTypeScriptParametersOptions-
defaultTypeScriptPayloadGenerator-
zodAsyncAPICodegenConfiguration-
zodAsyncAPIGenerators-
zodAsyncAPITypeScriptGenerators-
zodTheCodegenConfiguration-

Functions

FunctionDescription
generateTypeScriptChannels-
generateTypescriptParameters-
generateTypescriptPayload-
getDefaultConfigurationReturns the default generator for the preset of the language
loadAndRealizeConfigFileLoad the configuration file and realize it with default options if necessary.
loadAsyncapi-
loadConfigFileLoad configuration from file.
realizeConfigurationEnsure that each generator has the default options along side custom properties
realizeGeneratorContextLoad configuration and input document to create generator context
renderGenerator-
run-
runGeneratorsFunction that runs the given generator context ensuring the generators are rendered in the correct order.