Skip to content

fix: add missing EntityV3APISpecInterface model and inflector entry#3550

Closed
nogates wants to merge 2 commits into
masterfrom
nogates/add-entity-v3-api-spec-interface
Closed

fix: add missing EntityV3APISpecInterface model and inflector entry#3550
nogates wants to merge 2 commits into
masterfrom
nogates/add-entity-v3-api-spec-interface

Conversation

@nogates

@nogates nogates commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a bug in .generator/src/generator/openapi.py where additionalProperties: false was incorrectly treated as a pure-map schema, causing oneOf schemas with that constraint to be silently skipped
  • Adds the previously missing lib/datadog_api_client/v2/models/entity_v3_api_spec_interface.rb (now generated correctly by the fixed generator)
  • Adds the corresponding "v2.entity_v3_api_spec_interface" => "EntityV3APISpecInterface" inflector entry

Root cause

child_models() skips schemas that look like pure maps (additionalProperties: <schema> with no properties). The guard condition checked only "additionalProperties" in schema, which matched both real map schemas AND schemas with additionalProperties: false (a JSON Schema keyword meaning "no extra properties allowed").

EntityV3APISpecInterface is a oneOf with additionalProperties: false — it's not a map at all. Because it matched the guard, it was never yielded from child_models() and therefore never generated.

The fix mirrors the pattern already used in type_to_ruby() in the same file: only treat additionalProperties as a map type when its value is not in (None, False).

Test plan

  • Run ./generate locally — entity_v3_api_spec_interface.rb should now appear in the output (not be deleted)
  • Verify EntityV3APISpec deserialization works when interface is present in the response payload

🤖 Generated with Claude Code

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>
@nogates nogates requested review from a team as code owners July 6, 2026 14:09
@datadog-official

datadog-official Bot commented Jul 6, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

Ensure labels | changelog   View in Datadog   GitHub Actions

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2520a63 | Docs | Datadog PR Page | Give us feedback!

@nogates nogates closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant