Conversation
ahl
commented
May 13, 2023
Comment on lines
+409
to
+411
| pub(super) fn default_bool<const V: bool>() -> bool { | ||
| V | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
this seems to be unused
Comment on lines
+75
to
+76
| #[serde(default = "defaults::core_schema_meta_schema_object_items")] | ||
| items: CoreSchemaMetaSchemaObjectItems, |
Collaborator
Author
There was a problem hiding this comment.
I'm not sure why other types like this are Option<T> and this is not.
ahl
commented
Jan 17, 2024
typify/tests/schemas/reflexive.rs
Outdated
Comment on lines
186
to
187
| Variant0(Box<CoreSchemaMetaSchema>), | ||
| Variant1(SchemaArray), |
Collaborator
Author
There was a problem hiding this comment.
I wish these were
pub enum CoreSchemaMetaSchemaObjectItems {
CoreSchemaMetaSchema(Box<CoreSchemaMetaSchema>),
SchemaArray(SchemaArray),
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.