fix(generator): nullable inline object schema crashes on nil value#3976
Merged
fix(generator): nullable inline object schema crashes on nil value#3976
Conversation
When a BDD scenario sends null for a nullable field whose schema is an inline object (no \$ref), reference_to_value raised NotImplementedError because it tried to look up a NewNullableXxx function that doesn't exist for anonymous types. Since nil doesn't need wrapping, return it directly. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
walidcavelius
approved these changes
Apr 17, 2026
nogates
approved these changes
Apr 17, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Apr 17, 2026
…3976) When a BDD scenario sends null for a nullable field whose schema is an inline object (no \$ref), reference_to_value raised NotImplementedError because it tried to look up a NewNullableXxx function that doesn't exist for anonymous types. Since nil doesn't need wrapping, return it directly. Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> 2dafb57
github-actions Bot
pushed a commit
to ConnectionMaster/datadog-api-client-go
that referenced
this pull request
Apr 17, 2026
…ataDog#3976) When a BDD scenario sends null for a nullable field whose schema is an inline object (no \$ref), reference_to_value raised NotImplementedError because it tried to look up a NewNullableXxx function that doesn't exist for anonymous types. Since nil doesn't need wrapping, return it directly. Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> 2dafb57
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.
Summary
reference_to_valueraisedNotImplementedErrorwhen a BDD scenario sentnullfor a nullable field whose schema is an inline object (no$ref)5172f6dc6) — it was never deliberately designed, just never hit until nowvalue == "nil"and no named type is available, return"nil"directly — there is nothing to wrapNotImplementedErrorfor the non-nil anonymous case is preserved (genuinely unsupported, and unreachable fortype: objectin practice)Test plan
poetry run pytest tests/test_formatter.py -v— 7 tests pass (5 existing + 2 new)data=Nonewith{type: object, nullable: true}and withadditionalProperties: {}🤖 Generated with Claude Code
Run the generator with those changes and I confirmed there were no changes