Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.0.3 (2025-11-16)

## Bug fixes

- Disallow both ZodNull and ZodNullable types for output

## 2.0.2 (2025-11-16)

### Bug fixes
Expand Down
6 changes: 4 additions & 2 deletions packages/nestjs-endpoints/src/endpoint-fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@nestjs/common';
import { HttpAdapterHost } from '@nestjs/core';
import { ApiBody, ApiOperation, ApiResponse } from '@nestjs/swagger';
import { z, ZodNullable, ZodType } from 'zod';
import { z, ZodNull, ZodNullable, ZodType } from 'zod';
import { settings } from './consts';
import {
ZodSerializationException,
Expand Down Expand Up @@ -273,7 +273,9 @@ export function endpoint<
* })
* ```
*/
output?: OutputSchema extends ZodNullable ? never : OutputSchema;
output?: OutputSchema extends ZodNull | ZodNullable<any>
? never
: OutputSchema;
/**
* Inject controller providers at class instance level.
*
Expand Down