Conversation
|
this... looks like a nightmare to maintain |
|
@TheArcaneBrony what makes you say that? zod is great and looking through the diff, it looks much simpler. removes ajv entirely. I always hated things like these comments server/src/schemas/uncategorised/ApplicationAuthorizeSchema.ts Lines 24 to 28 in f4e0a63 |
MaddyUnderStars
left a comment
There was a problem hiding this comment.
- need to run prettier
- need to fix the test ci
- should do a pass and simplify some of the schemas. the
ChannelModifySchemafor example, you've set all of the properties to optional rather than just using a.partial()on the parent object
|
I feel like those comments are perfectly fine? On the other hand, that specific case should be handled in code rather than schema validation... (ie. for use with 8 or 10 digit TOTP codes) |
1cde96b to
5016680
Compare
The CI fails on main too so I feel it's kind of out of scope of this PR especially since it still fails after running the linter plus nix CI succeeds. I went through somewhat and did psrtials I'm at work though now so I can't do anything more. |
|
I though ajv was unable to work with GW, if we could get something to work there, that'd be great |
|
Zod should be able to work with gateway since it just parses and validates data, I was working on converting more stuff to Zod since this just did the API, I've got some partial progress but I feel that's another PR? |
|
Hey, just gonna point this out now. I don't think this works at all. Zod does not have a way to do type cohesion everywhere which is required here. |
What do you mean we literally have z.infer giving us a ts type?? |
|
cohesion, not checking |
It ran compiles, fermi connects, openapi generates, probally didnt fully utilize zods validators though