Skip to content

tsoa-next / @tsoa-next/cli / Config

Interface: Config

Defined in: packages/runtime/src/config.ts:5

Root tsoa-next configuration consumed by the CLI and programmatic generators.

Properties

compilerOptions?

ts
optional compilerOptions?: Record<string, unknown>;

Defined in: packages/runtime/src/config.ts:47

TypeScript CompilerOptions to be used during generation. These are merged over compiler options resolved from tsconfig.


controllerPathGlobs?

ts
optional controllerPathGlobs?: string[];

Defined in: packages/runtime/src/config.ts:29

An array of path globs that point to your route controllers that you would like to have tsoa include.


defaultNumberType?

ts
optional defaultNumberType?: "double" | "float" | "integer" | "long";

Defined in: packages/runtime/src/config.ts:68

OpenAPI number type to use for TypeScript number when no narrower annotation is present.

Default

ts
double

entryFile

ts
entryFile: string;

Defined in: packages/runtime/src/config.ts:24

The entry point to your API


ignore?

ts
optional ignore?: string[];

Defined in: packages/runtime/src/config.ts:19

Directories to ignore during TypeScript metadata scan


multerOpts?

ts
optional multerOpts?: Options;

Defined in: packages/runtime/src/config.ts:62

Legacy multer options forwarded into generated middleware. The storage option is not supported.

Example

ts
{
     *   "dest": "/tmp"
     * } Allows multer to write files to disk instead of keeping them in memory.

Deprecated

Since v6.4.0, RegisterRoutes can receive multerOptions directly. This config-level option will be removed in a future release. (https://github.com/tsoa-next/tsoa-next/issues/1587#issuecomment-2391291433) (https://github.com/tsoa-next/tsoa-next/pull/1638)


noImplicitAdditionalProperties?

ts
optional noImplicitAdditionalProperties?: "ignore" | "throw-on-extras" | "silently-remove-extras";

Defined in: packages/runtime/src/config.ts:34

Modes that allow you to prevent input data from entering into your API. This will document your decision in the swagger.yaml and it will turn on excess-property validation (at runtime) in your routes.


routes

ts
routes: RoutesConfig;

Defined in: packages/runtime/src/config.ts:14

Route generation configuration.


spec

ts
spec: SpecConfig;

Defined in: packages/runtime/src/config.ts:9

OpenAPI generation configuration.


tsconfig?

ts
optional tsconfig?: string;

Defined in: packages/runtime/src/config.ts:41

Path to a tsconfig file used as an input source for compiler options during generation. If omitted, tsoa-next will look for tsconfig.json starting from the loaded tsoa config directory. Explicit compilerOptions in tsoa-next config still take precedence over tsconfig values.

TypeScript-first OpenAPI generation, route generation, and runtime validation.