Skip to content

KUBB_INPUT_REQUIRED: Input required

Code: KUBB_INPUT_REQUIRED Level: error

An adapter is configured but no input was provided, so there is nothing to parse.

What happened

The adapter needs a source document. It reads one from input: a file path, a URL, an inline spec, or a parsed object. This diagnostic fires when input is not set. It also fires when merging is requested but no documents are passed.

How to fix it

Set input to a file path or URL.

kubb.config.ts
typescript
input: './petStore.yaml'

Or pass an inline spec or a parsed object.

kubb.config.ts
typescript
input: openapiObject

Example

kubb.config.ts
typescript
import { 
defineConfig
} from 'kubb/config'
export default
defineConfig
({
// input is missing
output
: {
path
: './src/gen' },
plugins
: [/* ... */],
})

Example output

Terminal
text
[KUBB_INPUT_REQUIRED] @kubb/adapter-oas: An adapter is configured without an input.
  fix: Set `input` to a file path, a URL, an inline spec (JSON/YAML string), or a parsed object in your Kubb config.
  see: https://kubb.dev/docs/5.x/reference/diagnostics/kubb-input-required

See also