daemon/internal: add "compat" package for legacy responses#50852
daemon/internal: add "compat" package for legacy responses#50852thaJeztah merged 1 commit intomoby:masterfrom
Conversation
|
Found this one back in my stash; was pretty much work in progress with some options I was playing with |
|
This LGTM and I know at least one example where it could have been useful. i.e. #50826 had some specific logic for that use case. |
|
Yeah, I didn't want to move it out of draft if we wouldn't be using it (yet), but if you think it would make sense to re-implement the existing ones with this, we could. One thing I'm not sure of in this patch is if the use of generics adds much value; ISTR originally I had the I may have had other code using generics originally, but recall that I simplified the patch (but don't think I still have earlier implementations around). |
Add a package to help augmenting API responses with additional fields, replacing fields, or to remove fields from the response to allow for legacy API responses to be produced without having to keep deprecated fields in the API type definitions. Co-authored-by: Albin Kerouanton <[email protected]> Signed-off-by: Sebastiaan van Stijn <[email protected]>
88c7bd2 to
33a05ac
Compare
|
@akerouanton I applied your commit that removed the generics and squashed it to a single commit (adding you as co-author); I was just also working on a PR that could use this one, so we can probably get this one in already as a separate one. |
|
I'll bring this one in |
Add a package to help augmenting API responses with additional fields, replacing fields, or to remove fields from the response to allow for legacy API responses to be produced without having to keep deprecated fields in the API type definitions.
- What I did
- How I did it
- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)