Repository navigation
Synchronize from upstream - #1
Conversation
Added more fullSchema tests for classes and structs
Added `CODE_OF_CONDUCT``
Added .NET 8
Bumps System.Text.Json from 8.0.0 to 8.0.4. --- updated-dependencies: - dependency-name: System.Text.Json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
#97 Make dependencies conditional
…ator/System.Text.Json-8.0.4 Bump System.Text.Json from 8.0.0 to 8.0.4 in /SchemaGenerator
--- updated-dependencies: - dependency-name: System.Text.Json dependency-version: 8.0.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…rator/System.Text.Json-8.0.5 Bump System.Text.Json from 8.0.4 to 8.0.5
Signed-off-by: Ebere Abanonu <eabanonu@yahoo.com>
Signed-off-by: Ebere Abanonu <eabanonu@yahoo.com>
Remove net7.0 from target frameworks
Update target frameworks to net8.0 only
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0dc898c8d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var propertyTypeName = p.PropertyType.Name; | ||
| if (existingTypes.Contains(propertyTypeName)) |
There was a problem hiding this comment.
Reuse nullable enums by their underlying name
When a record has more than one nullable enum property, this stores Nullable1as the seen type name instead of the enum's underlying name. The first nullable enum adds that generic wrapper name toexistingTypes, so the next nullable enum takes the reuse path and emits "Nullable1" as the Avro type, which cannot resolve to the enum definition. Use p.PropertyType.GetSubTypeIfNullable().Name for tracking and reuse.
Useful? React with 👍 / 👎.
| { | ||
| fieldProperties.Add(GetFields(p)); |
There was a problem hiding this comment.
Preserve dictionaries inside nested records
When a nested user-defined class contains a Dictionary<,> property, this fallback treats it like a primitive field because this method handles lists but has no dictionary branch. GetFields then calls ToAvroDataType with Dictionary2, so schema generation throws for models such as Root.Child.Tags : Dictionary<string,string>` even though top-level dictionaries are supported elsewhere.
Useful? React with 👍 / 👎.
| var pAliases = GetAliases(p); | ||
| var rw = required | ||
| ? new Dictionary<string, object> |
There was a problem hiding this comment.
Use the nested field's required flag
Inside GetGenericUserDefinedProperties, required is the flag passed in for the containing collection/map, while require is this list field's own [Required] state. Using the outer flag here makes every list property inside a required collection item non-nullable even when that inner property is not [Required] (and the reverse when the parent is optional), so generated schemas corrupt the nested field nullability.
Useful? React with 👍 / 👎.
No description provided.