Description
Hello.
I am cross-checking schema validations, particularly regarding formatting.
I am struggling to understand the inner workings of typeValidator
, and especially the schemaInfoForType()
function.
At first glance, it looked to me that this big reflected type switch was very much dependant on strfmt types and should be kept in sync.
Then I realized this type switch can never be fully explored, because schemaValidator replaces any provided struct by its json equivalent (using swag.ToDynamicJSON).
I can see that some old TODO
s still remain about handling structs, etc...
Could anyone explain what was the intent with checking all these types here?
It looks like the initial intent was different, could not be completed for some reason, then worked around using JSON.
Thanks
FRED