Skip to content

Commit e4eb9f1

Browse files
committed
Readme: removing caveat article on coerce.
1 parent b656fdf commit e4eb9f1

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ Start your API server with I/O schema validation and custom middlewares in minut
6161
5. [Deprecated schemas and routes](#deprecated-schemas-and-routes)
6262
6. [Customizable brands handling](#customizable-brands-handling)
6363
8. [Caveats](#caveats)
64-
1. [Coercive schema of Zod](#coercive-schema-of-zod)
65-
2. [Excessive properties in endpoint output](#excessive-properties-in-endpoint-output)
64+
1. [Excessive properties in endpoint output](#excessive-properties-in-endpoint-output)
6665
9. [Your input to my output](#your-input-to-my-output)
6766

6867
You can find the release notes and migration guides in [Changelog](CHANGELOG.md).
@@ -1429,16 +1428,6 @@ new Integration({
14291428
There are some well-known issues and limitations, or third party bugs that cannot be fixed in the usual way, but you
14301429
should be aware of them.
14311430

1432-
## Coercive schema of Zod
1433-
1434-
Despite being supported by the framework, `z.coerce.*` schema
1435-
[does not work intuitively](https://github.com/RobinTail/express-zod-api/issues/759).
1436-
Please be aware that `z.coerce.number()` and `z.number({ coerce: true })` (being typed not well) still will NOT allow
1437-
you to assign anything but number. Moreover, coercive schemas are not fail-safe and their methods `.isOptional()` and
1438-
`.isNullable()` [are buggy](https://github.com/colinhacks/zod/issues/1911). If possible, try to avoid using this type
1439-
of schema. This issue [will NOT be fixed](https://github.com/colinhacks/zod/issues/1760#issuecomment-1407816838) in
1440-
Zod version 3.x.
1441-
14421431
## Excessive properties in endpoint output
14431432

14441433
The schema validator removes excessive properties by default. However, Typescript

0 commit comments

Comments
 (0)