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
@geraintluff, introduced a custom format to accept null or any accepted data type as input value. But somewhere in the tv4 code the null check is being executed even before it actually checks for the format and hence tv4 throws a null error before checking the custom format.
Can any changes be done to move the null check in the library in such a way that addFormat or defineKeword do not throw error even if we send null as the data.
The text was updated successfully, but these errors were encountered:
To overcome this I have for now removed the type field from the swagger and added a custom format without the type field details. Custom created a format and checked null and type of data inside the custom format method.
By doing this, code does not break since type is not present and passes for the fields whose value is null in the Request body and are non mandatory as per swagger and for whom the format is mentioned as the custom format in the swagger spec 2.0.
@geraintluff, introduced a custom format to accept null or any accepted data type as input value. But somewhere in the tv4 code the null check is being executed even before it actually checks for the format and hence tv4 throws a null error before checking the custom format.
Can any changes be done to move the null check in the library in such a way that addFormat or defineKeword do not throw error even if we send null as the data.
The text was updated successfully, but these errors were encountered: