Nog CLI Developer Guide - v0.11.0
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Generates the api.module.ts NestJS dynamic module. The configuration providers (API_CONFIG, ApiConfiguration, RequestBuilder) live directly on the module so each forRoot[Async] invocation owns its own config — two distinct registrations stay isolated under NestJS v11 reference-equality dedup. HttpModule.registerAsync receives the async config providers via extraProviders, by reference to the same array spread into the module's own providers, so the consumer useFactory runs exactly once per registration.

      Parameters

      • services: IrService[]

        IR services to register as providers and exports in the module.

      • moduleName: string

        Base module name used to derive the PascalCase class name.

      • cliVersion: string

        Version of the CLI tool, written into the file header.

      • specTitle: string

        Title of the OpenAPI specification, written into the file header.

      • specVersion: string

        Version of the OpenAPI specification, written into the file header.

      Returns Promise<IAstPrintedFile>

      File name and rendered TypeScript source content.