Skip to content

Configuration

Extensive configuration options to customize the generated output to match your needs.

Usage

typescript
// openapi.config.ts
import { GeneratorConfig } from 'ng-openapi';

const config: GeneratorConfig = {
  input: './swagger.json',
  output: './src/api',
  options: {
    dateType: 'Date',
    enumStyle: 'enum',
  }
};

export default config;

Configuration Properties

Client Name

Type: string | undefined | Default: Default

Output directory for generated files.

Input

Type: string | Required

Path to your OpenAPI/Swagger specification file.

Output

Type: string | Required

Output directory for generated files.

Options

Type: object | Required

Object containing various options to customize the code generation process.

Compiler Options

Type: object | undefined | Default: undefined

TypeScript compiler options for the generated code.

Released under the MIT License.
This site is powered by Netlify