Repository navigation
fix!: Stricter schema parsing - #479
Merged
Merged
Conversation
martin-g
reviewed
Feb 23, 2026
martin-g
left a comment
Member
There was a problem hiding this comment.
Here are some comments on the proposed changes in this PR.
But as I commented at #476 (comment) the Java and Python SDKs do support parsing such flat schemas too.
| let result = Schema::parse_str(schema_str).unwrap_err(); | ||
| assert_eq!( | ||
| result.to_string(), | ||
| "Invalid schema: There is no type called 'enum', if you meant to define a non-primitive schema, it should be defined inside `type` attribute. Please review the specification" |
Member
There was a problem hiding this comment.
Suggested change
| "Invalid schema: There is no type called 'enum', if you meant to define a non-primitive schema, it should be defined inside `type` attribute. Please review the specification" | |
| "Invalid schema: There is no type called 'enum', if you meant to define a non-primitive schema, it should be defined inside `type` attribute. Please consult with the specification" |
Contributor
Author
There was a problem hiding this comment.
I've removed the entire Please review the specification/Please consult with the specification bit
Member
There was a problem hiding this comment.
This needs reworking too.
logicalType, symbols, size, items and values cannot be at that level anymore.
Contributor
Author
There was a problem hiding this comment.
I've also removed the position field, as it is not in the spec or used in the code.
martin-g
approved these changes
Feb 24, 2026
Closed
2 of 4 tasks
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 will break code, as it no longer accepts invalid schemas.
Closes #476