Skip to content

Conversation

@ash-thakur-rh
Copy link
Contributor

Description

Fixes #7380

This PR adds a duplicate field detection processor to prevent "duplicate key in map literal" errors when embedded structs have conflicting JSON field names(cluster-api-provider-azure had conflicting JSON field name)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@manusa manusa changed the title bug(generator): Added duplicate field detection processor to prevent duplicate key in map fix(openapi): implement processInlineDuplicateFields to resolve duplicate JSON field names (review) Dec 17, 2025
@manusa manusa changed the title fix(openapi): implement processInlineDuplicateFields to resolve duplicate JSON field names (review) fix(openapi): implement processInlineDuplicateFields to resolve duplicate JSON field names Dec 17, 2025
@manusa manusa added this to the 7.5.0 milestone Dec 17, 2025 — with automated-tasks
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa merged commit eb8eee4 into fabric8io:main Dec 17, 2025
18 of 19 checks passed
@ash-thakur-rh ash-thakur-rh deleted the generator-duplicate-key-fix branch December 17, 2025 11:44
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.

Go openAPI generator errors out when embedded structs have conflicting JSON field names

2 participants