You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 TODOs 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
The text was updated successfully, but these errors were encountered:
Hello.
I am cross-checking schema validations, particularly regarding formatting.
I am struggling to understand the inner workings of
typeValidator
, and especially theschemaInfoForType()
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
The text was updated successfully, but these errors were encountered: