Skip to content

Compiler: support Standard Schema metadata transformation in Vite and Vitest #29

Description

@chrishiguto

Problem

The compiler plugin currently runs through the Nest CLI tsc builder only. Applications using Vitest load controller source without the transformation, so zero-argument DTO request decorators and inferred response metadata differ between production builds and source-based HTTP/OpenAPI tests. Each consumer should not need to build its own transformer or keep permanent explicit metadata solely for test parity.

Desired outcome

Provide a supported Vite/Vitest integration, or another package-owned integration that applies the same transformation as the Nest CLI plugin. The implementation and compiler semantics should remain centralized in this package.

Acceptance criteria

  • The same controller produces equivalent request, response, serialization, status, and Swagger metadata under Nest CLI and Vitest.
  • Covers zero-argument @Body(), @Query(), and whole-object @Param().
  • Covers response DTOs, one array layer, concrete envelope DTOs, and standard/custom statuses.
  • Explicit metadata retains precedence and is never duplicated.
  • Includes a runnable Vitest example that exercises HTTP behavior and emitted OpenAPI.
  • Consumers need no application-local AST transformer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions