Skip to content

Releases: rhyek/nestjs-endpoints

2.0.3

16 Nov 20:34
bc03f1b

Choose a tag to compare

Bug fixes

  • Middleware that added response headers after controller execution were failing with Cannot set headers after they are sent to the client.

    This was fixed, however nestjs-endpoints can no longer support endpoint output schemas that are nullable. NestJS does not send null when using Express.js. More info.

    So instead of:

    endpoint({
      output: personSchema.nullable(),
      ...
    });

    now do:

    endpoint({
      output: z.object({
        person: personSchema.nullable()
      }),
      ...
    })

2.0.2

16 Nov 20:18
beb30a8

Choose a tag to compare

Bug fixes

  • Middleware that added response headers after controller execution were failing with Cannot set headers after they are sent to the client.

    This was fixed, however nestjs-endpoints can no longer support endpoint output schemas that are nullable. NestJS does not send null when using Express.js. More info.

    So instead of:

    endpoint({
      output: personSchema.nullable(),
      ...
    });

    now do:

    endpoint({
      output: z.object({
        person: personSchema.nullable()
      }),
      ...
    })

2.0.1

19 Oct 20:57
e5b8fa6

Choose a tag to compare

Minor changes

  • Deprecated injectAtRequest in favor of injectOnRequest

2.0.0

16 Sep 01:33
958ff5a

Choose a tag to compare

Breaking Changes

  • Upgraded to Zod v4: Zod v3 schemas will have to be upgraded to v4.
  • Upgraded to zod-openapi v5: See the v5 migration guide if you used .openapi() extensions.
  • OpenAPI version upgrade: Now generates OpenAPI 3.1.1 schemas (previously 3.0.0).

Minor changes

  • Deprecated injectMethod parameter in favor of injectAtRequest for clarity.

1.5.1

29 Jun 04:45

Choose a tag to compare

Testing

  • Added more tests

1.5.0

22 Jun 19:54
1d2eea9

Choose a tag to compare

Features

  • Replaced nestjs-zod with zod-openapi. The main benefit is output schemas will now emit OpenApi schemas and consequently TypeScript definitions for endpoint payloads that consider ZodEffects.

Example:

const schema = z.object({
  age: z.number().default(30),
});

The above schema when used in input will still mark age as optional, but when used in output it will not.

type ExampleInput = {
  age?: number;
};

type ExampleOutput = {
  age: number;
};

1.4.0

14 Jun 01:19
d6858ca

Choose a tag to compare

Features

  • Provide rawInput to handlers with input schemas. This is the request body parsed by NestJS, but before zod.

1.3.1

27 May 04:15
376bffe

Choose a tag to compare

Bugfixes

1.3.0

12 Apr 22:39
f9a4967

Choose a tag to compare

Features

  • Added support for traditional controller imports + explicit HTTP paths
  • Can now call invoke() on endpoint instances. Useful for integration testing. Example.

1.2.1

06 Apr 07:46

Choose a tag to compare

readme