[WIP] Fix redundancy of GetBackingStore method in Go client
Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.
Original prompt
This section details on the original issue you should resolve
<issue_title>GetBackingStore gets emitted for models interfaces when it shouldn't</issue_title> <issue_description>### What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Nuget tool
Client library/SDK language
Go
Describe the bug
When generating a Go client with the backing store enabled, the GetBackingStore method gets emitted for the model interface when it is already defined in the BackedModel interface it already composes from.
This is redundant, making the compile time longer and leading to "heavier" binaries. (unless the Go compiler does some kind of smart trimming).
See this example in the Microsoft Graph SDK. https://github.com/microsoftgraph/msgraph-sdk-go/blob/2182e2493cff7e52e6f2273416f25f43c9fb2888/models/photo.go#L428
Expected behavior
The method should be trimmed from the interface definition like the methods from AdditionalDataHolder (GetAdditionalData, GetAdditionalData) and Parsable (Serialize, GetFieldDeserializers) are.
The solution should be implemented in the same way it is for those other methods.
How to reproduce
- generate a go SDK with the backing store enabled
- observe your model interfaces have the GetBackingStore method defined.
Open API description file
No response
Kiota Version
latest from main
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
No response
Debug output
Click to expand log
```</details> ### Other information _No response_</issue_description> <agent_instructions>use conventional commits. add a changelog entry under unreleased, bugfix.</agent_instructions> ## Comments on the Issue (you are @copilot in this section) <comments> </comments>
- Fixes microsoft/kiota#7195
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.