Documentation
    Preparing search index...
    • Attach an example value to the response body of a controller method.

      Two forms are supported:

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

      Both forms can coexist on the same method — the default example and any number of named examples will all surface in the generated Swagger document.

      Type Parameters

      • T

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

      Parameters

      • value: T

      Returns MethodDecorator

    • Attach an example value to the response body of a controller method.

      Two forms are supported:

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

      Both forms can coexist on the same method — the default example and any number of named examples will all surface in the generated Swagger document.

      Type Parameters

      • T

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

      Parameters

      • key: string
      • value: T

      Returns MethodDecorator