Documentation
    Preparing search index...
    • Attach an example value to a request parameter (body, path, query, etc.) of a controller method.

      Two forms are supported:

      • Parameter(value): registers value as the single default example for that parameter.
      • Parameter(key, value): registers value under examples[key]. May be applied multiple times to attach several named examples to the same parameter.

      Apply alongside the actual parameter decorator (@TypedBody(), @TypedParam(), @TypedQuery(), etc.); decorator order does not matter.

      Type Parameters

      • T

        Type of the example value (typically the parameter's DTO).

      Parameters

      • value: T

      Returns ParameterDecorator

    • Attach an example value to a request parameter (body, path, query, etc.) of a controller method.

      Two forms are supported:

      • Parameter(value): registers value as the single default example for that parameter.
      • Parameter(key, value): registers value under examples[key]. May be applied multiple times to attach several named examples to the same parameter.

      Apply alongside the actual parameter decorator (@TypedBody(), @TypedParam(), @TypedQuery(), etc.); decorator order does not matter.

      Type Parameters

      • T

        Type of the example value (typically the parameter's DTO).

      Parameters

      • key: string
      • value: T

      Returns ParameterDecorator