Replies: 3 comments 3 replies
-
|
Sorry but I'm not sure what you mean exactly. Could you elaborate and maybe give an example |
Beta Was this translation helpful? Give feedback.
-
|
@Oudwins sorry, sure!
=> i know this all sound very vage, but i will hack on this this weekend and get back to you next week! |
Beta Was this translation helpful? Give feedback.
-
|
@gm0stache This is very interesting. I'm curious how this would work if ran after the schema is already defined (i.e runs the second time). I imagine you just nope out if it already exists. But if you want to support this working when you add a field you would have to check all the fields. If you come up with a prototype for this I would love to see it and would be 100% open to merging something like this. Something that is similar which is already in the roadmap, is schema -> struct generation. Do you feel like struct -> schema is more interesting? For example the idea is: // file: schemas.go
// some go generate comment here
var UserSchema = z.Struct(
"username": z.String(),
'password": z.String(),
)
// file: schemas.struct.go
type User struct {
Username string
Password string
}have a look at this -> #67 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hi there!
cool project!
are there any plans to support the generation of strong-typed schema structs?
Beta Was this translation helpful? Give feedback.
All reactions