chrishoermann / zod-prisma-types

Generator creates zod types for your prisma models with advanced validation
Other
579 stars 43 forks source link

Don't create nested folder if useMultipleFiles=false #107

Open oceandrama opened 1 year ago

oceandrama commented 1 year ago

Now, if you are using config like this:

generator zod {
  provider         = "zod-prisma-types"
  output           = "../src/shared/api/zod.ts"
  useMultipleFiles = false //default
}

it creates shared/api/zod.ts folder and index.ts file inside. Maybe it would be simpler to create just shared/api/zod.ts file to reduce nesting

chrishoermann commented 1 year ago

@oceandrama this desicion was made to partly satisfy my OCD and to find specific kinds of types easier. I'don't know if the nesting has any downsides other than the additional folders but for me it seemd to be a bit more structured.