Improve code generation to avoid multiple hardcoded values, focusing on behaviour rather than type names.
Eg, instead of hardcoding that InputMedia requires an InputParams method, we can work it out by knowing that all InputMedia types contain InputFiles, and so will have data.
This also removes file.Get, which was a pointless helper method which just got the same file from an existing file, and so achieved nothing. Bad codegen there.
Impact
Are your changes backwards compatible? N - technically the removal of file.get is a breaking change, but i dont expect anyone to be relying on a useless method.
Have you included documentation, or updated existing documentation? Y
Do errors and log messages provide enough context? Y
What
Improve code generation to avoid multiple hardcoded values, focusing on behaviour rather than type names.
Eg, instead of hardcoding that
InputMedia
requires anInputParams
method, we can work it out by knowing that allInputMedia
types containInputFile
s, and so will have data.This also removes file.Get, which was a pointless helper method which just got the same file from an existing file, and so achieved nothing. Bad codegen there.
Impact