Documentation
    Preparing search index...

    Class NestiaSdkApplication

    Runs the generators of @nestia/sdk over one configuration.

    Each method validates the configuration for the output it needs, analyzes the controllers and the TypeScript metadata, reports every error at once, and then generates.

    contracts/common.md#principled-implementation The shared pipeline reflects controllers, types routes from transform metadata, assigns accessors and rejects collected analysis errors before writing. SDK-specific representability checks are attached by sdk and SDK-producing all; e2e currently invokes the SDK writer without that additional validation callback.

    contracts/common.md#clear-and-simple-design One class with four public generators over one private pipeline; directory assertion, title, and error report are module-private helpers.

    contracts/common.md#prohibited-implementation-shortcuts No controller or route name is special-cased; the same pipeline serves the CLI and programmatic callers.

    contracts/common.md#meaningful-documentation The comment states the four generators and that the errors of an analysis are reported together.

    contracts/portability.md#os-neutral-implementation Output checks and diagnostic locations use Node fs.stat and path operations; controller compilation and output writes remain owned by ConfigAnalyzer and the generators. Filesystem errors distinguish missing/non-directory locations from other native failures.

    Index
    • Generates everything the configuration asks for: the SDK and its e2e tests when output is set, and the Swagger document when swagger is set.

      It throws when neither output nor swagger.output is configured.

      Returns Promise<void>

      contracts/common.md#principled-implementation The SDK validation is attached only when an SDK is generated, so a Swagger-only run does not fail on SDK rules, and the e2e tests are generated after the SDK they import.

      contracts/common.md#clear-and-simple-design One method that composes the generators inside the shared pipeline.

      contracts/common.md#prohibited-implementation-shortcuts The error names the properties a caller can configure; none is stale.

      contracts/common.md#meaningful-documentation The comment states what is generated and the failure.

      contracts/portability.md#os-neutral-implementation all delegates configured output creation to the native writers and does not apply the explicit parent-directory checks used by sdk/e2e/swagger. Diagnostic source paths are rendered relative to the current native working directory.

    • Generates the SDK and the automatic e2e test functions.

      It throws when output or e2e is missing, or when the parent directory of either does not exist.

      Returns Promise<void>

      contracts/common.md#principled-implementation The e2e functions import the generated SDK, so the SDK is generated first, and both parent directories are asserted before any analysis runs.

      contracts/common.md#clear-and-simple-design One method over the shared pipeline.

      contracts/common.md#prohibited-implementation-shortcuts The directory check follows the configuration and no path is special-cased.

      contracts/common.md#meaningful-documentation The comment states the requirements and the failures.

      contracts/portability.md#os-neutral-implementation path.resolve obtains each native parent and fs.stat follows symlinks to verify a directory before analysis. ENOENT/ENOTDIR become configuration diagnostics; permission and other filesystem errors propagate without a platform-specific shell fallback.

    • Generates the SDK library.

      It throws when output is missing or its parent directory does not exist.

      Returns Promise<void>

      contracts/common.md#principled-implementation The SDK validation runs after route typing and before the generator, so a route the SDK cannot express is reported instead of written.

      contracts/common.md#clear-and-simple-design One method over the shared pipeline.

      contracts/common.md#prohibited-implementation-shortcuts The directory check follows the configuration.

      contracts/common.md#meaningful-documentation The comment states the requirement and the failures.

      contracts/portability.md#os-neutral-implementation The configured output parent is resolved through Node path and verified by fs.stat, including linked directories. Generator writes use their own native boundaries; this entry does not infer case identity from an OS name.

    • Generates the Swagger document.

      It throws when swagger.output is missing or the directory that will hold the document does not exist; the output may be a file or a directory.

      Returns Promise<void>

      contracts/common.md#principled-implementation The directory to check is the parent of a file path with an extension and the path itself otherwise, which is how the generator decides where to write.

      contracts/common.md#clear-and-simple-design One method over the shared pipeline.

      contracts/common.md#prohibited-implementation-shortcuts The rule is the generator's own output rule.

      contracts/common.md#meaningful-documentation The comment states the requirement and the two output forms.

      contracts/portability.md#os-neutral-implementation path.parse/resolve decide the native containing directory from whether the output has an extension, matching SwaggerGenerator's destination rule. The common directory check distinguishes missing paths from non-directory entries and propagates other filesystem errors.