Skip to content

fix(golang): make object values nullable when specified#24265

Open
rubenhoenle wants to merge 1 commit into
OpenAPITools:masterfrom
rubenhoenle:master
Open

fix(golang): make object values nullable when specified#24265
rubenhoenle wants to merge 1 commit into
OpenAPITools:masterfrom
rubenhoenle:master

Conversation

@rubenhoenle

@rubenhoenle rubenhoenle commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

relates to #24264

Detailed description and testing instructions can be found in the GitHub issue.

PR checklist

  • Read the contribution guidelines.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@antihax @grokify @kemokemo @jirikuncar @ph4r5h4d @lwj5


Summary by cubic

Fixes Go codegen to respect nullable for additionalProperties values. Generates map[string]*T when the value schema is nullable: true, skips pointers for map/slice values, and defaults to interface{} when no value schema is provided.

  • Bug Fixes
    • Map values use pointers only when the inner schema is nullable and not a map/slice.
    • Nested objects honor nullable on inner values (e.g., map[string]map[string]*string).

Written for commit e3624b6. Summary will update on new commits.

Review in cubic

@rubenhoenle rubenhoenle marked this pull request as ready for review July 10, 2026 07:57

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

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