-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: use json schema for json schema #293
base: main
Are you sure you want to change the base?
Conversation
pub(super) fn default_bool<const V: bool>() -> bool { | ||
V | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to be unused
#[serde(default = "defaults::core_schema_meta_schema_object_items")] | ||
items: CoreSchemaMetaSchemaObjectItems, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why other types like this are Option<T>
and this is not.
Variant0(Box<CoreSchemaMetaSchema>), | ||
Variant1(SchemaArray), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish these were
pub enum CoreSchemaMetaSchemaObjectItems {
CoreSchemaMetaSchema(Box<CoreSchemaMetaSchema>),
SchemaArray(SchemaArray),
}
This is a WIP PR related to #289 and #290. We can successfully generate code from the JSON schema draft 7 schema... but the code doesn't compile and is lacking in a couple of ways. This PR is to track those deficiencies.
UPDATE: the code is now generating cleanly and compiling. There are still some aspect that aren't well represented in the Rust output.
UPDATE 9/2023: the output is looking pretty good with maybe one or two quirks, but this seems good enough to merge.