Schemas
Here you can find how to secure and simplify schemas for your PocketBase instance:
- with the CLI generated schemas
- with the
expand
method - with the
pick
method - with the
select
method
0 - A Zod schema for a Post collection
Here is the original schema for a Post
collection:
1 - With CLI generated schema
All schemas are generated from your PocketBase.
2 - With pick
pick
is a syntactic sugar for native zod pick
.
3 - With expand
expand
is a syntactic sugar for native zod extend
on the property expand
coupled with transform
.
4 - With select
select
is the union of pick
and expand
.