[pull] master from DataDog:master#308
Merged
pull[bot] merged 3 commits intoConnectionMaster:masterfrom Apr 14, 2026
Merged
Conversation
…3883) Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
#3930) Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
… nullable map example generation (AAWF-1198) (#3952) * fix(formatter): handle empty additionalProperties as map[string]interface{} When `additionalProperties: {}` is set on a schema, Python's truthiness evaluates the empty dict as falsy, causing the additionalProperties block to be skipped. The generator then fell through to the nullable path and emitted `*NewNullableXxx(&Xxx{})` — a constructor that is never generated for map schemas — resulting in a Go compile error. Fix the condition to check for the presence of the key and an explicit `false` value rather than relying on truthiness. When additionalProperties is an empty dict or boolean `true`, normalize to `interface{}` as the nested value type and format values inline. Also remove the now-unreachable dead-code branch that previously handled `type: object + additionalProperties: {}` after the nullable check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * pre-commit fixes * fix(formatter): properly escape values in untyped additionalProperties When formatting values for untyped additionalProperties (e.g. additionalProperties: {}), infer the schema from the Python value type so that string escaping, boolean and number formatting are handled correctly. Previously, the fallback `f'"{v}"'` would embed raw newlines in Go string literals, causing compile errors for values like multi-line strings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * pre-commit fixes * fix(formatter): use map type for named map schemas in array items When array items are a $ref to a schema with additionalProperties (and no properties), schema_name() returned the ref name (e.g. IDPConfigValueItem) which was used as the Go type — but no struct is ever generated for map schemas, causing a compile error. Apply the same additionalProperties != False guard used elsewhere so that named map schemas resolve to map[string]T instead of the struct name, consistent with how type_to_go() handles them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: ci.datadog-api-spec <packages@datadoghq.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )