Nog CLI Developer Guide - v0.10.5
    Preparing search index...

    Helper class to manage standard file headers for generated code.

    Embeds linting disable directives and generation metadata (CLI version, OpenAPI spec info) to identify generated artifacts and suppress linter warnings on synthesized code.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Inserts the generated file header at the beginning of a source file.

      Must be called after all other modifications and before formatText() to preserve header position.

      Parameters

      • sourceFile: SourceFile

        The ts-morph SourceFile instance to modify.

      • specTitle: string = 'Unknown Spec'

        The OpenAPI specification title.

      • specVersion: string = 'Unknown Version'

        The OpenAPI specification version.

      Returns void

    • Generates the standard header string for all emitted files.

      Includes:

      • Linter disable comments (tslint, eslint) to suppress false positives on generated code.
      • Signature line with CLI version and OpenAPI spec metadata for traceability.

      Parameters

      • specTitle: string = 'Unknown Spec'

        The title from the OpenAPI specification's info.title field.

      • specVersion: string = 'Unknown Version'

        The version from the OpenAPI specification's info.version field.

      Returns string

      The header string to prepend to generated source files.