Replies: 3 comments
-
|
I have the same idea. Have you started some experiments? I think it is doable, if we define an appropriate mapping for each validation node to some intermediate data representation from which the code is derived. I am trying to understand how quicktype or the swagger generator are accumulating information... |
Beta Was this translation helpful? Give feedback.
-
|
I'm working on it for quite some time now. At the beginning I've tried to use same code or ideas, but the way schema validation is done is quite different from how a generator would work |
Beta Was this translation helpful? Give feedback.
-
|
@goto40 i ended up using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This crate has a strong focus on validation of data in a performant way. Another great use case for json schemas is code generation. I am currently parsing json schemas for generating code inside of a proc macro. So I would like to parse a schema and iterate over objects and generate structs, for example. Is that possible with this crate?
Beta Was this translation helpful? Give feedback.
All reactions