fix: add missing EntityV3APISpecInterface model and inflector entry#3550
Closed
nogates wants to merge 2 commits into
Closed
fix: add missing EntityV3APISpecInterface model and inflector entry#3550nogates wants to merge 2 commits into
nogates wants to merge 2 commits into
Conversation
The EntityV3APISpec.interface property references EntityV3APISpecInterface as its type, but the model file was never committed. This caused a NameError at deserialization time for any response using that field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
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
.generator/src/generator/openapi.pywhereadditionalProperties: falsewas incorrectly treated as a pure-map schema, causing oneOf schemas with that constraint to be silently skippedlib/datadog_api_client/v2/models/entity_v3_api_spec_interface.rb(now generated correctly by the fixed generator)"v2.entity_v3_api_spec_interface" => "EntityV3APISpecInterface"inflector entryRoot cause
child_models()skips schemas that look like pure maps (additionalProperties: <schema>with noproperties). The guard condition checked only"additionalProperties" in schema, which matched both real map schemas AND schemas withadditionalProperties: false(a JSON Schema keyword meaning "no extra properties allowed").EntityV3APISpecInterfaceis a oneOf withadditionalProperties: false— it's not a map at all. Because it matched the guard, it was never yielded fromchild_models()and therefore never generated.The fix mirrors the pattern already used in
type_to_ruby()in the same file: only treatadditionalPropertiesas a map type when its value isnot in (None, False).Test plan
./generatelocally —entity_v3_api_spec_interface.rbshould now appear in the output (not be deleted)EntityV3APISpecdeserialization works wheninterfaceis present in the response payload🤖 Generated with Claude Code