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
When calling the Validate function after loading an OpenAPI doc, whenever there is a failure.. in my case an invalid paths error is thrown, with unsupported 'format' value 'int64'.. which is NOT invalid.. I have no idea where in the file being parsed the error is at. Even more odd is that if I keep running the same validate call, sometimes I get a little more info back.. no idea why its random.. but in this particular file most of the time the error is:
invalid paths: unsupported 'format' value "int64"
But sometimes it says:
invalid paths: parameter "dateRangeFrom" schema is invalid: unsupported 'format' value "int64"
I figured out the actual reason the parsing fails.. but even so....
Is there any way to get the error line of the parsing error? Any idea why the response to the validation error changes?
The text was updated successfully, but these errors were encountered:
Validation error changes most probably because elements of the openapi document are validated inside for ... range map[...]... loops, which introduces nondeterminism.
Something akin to JSON Path to point to the problematic place in both the schema and the data would be nice. I am not working on this though and #230 will probably bring this actually.
I'm curious what the reason was for unsupported 'format' value "int64"?
So.. the reason for invalid int64 was the type was number, not integer. Most of the types were set to integer. I thought that was odd too.. because the online validator says its completely valid. But the spec does indicate that if the type is integer, format can be int64 or int32 (if provided). So I think your validation is correct. I suspect maybe it was a number before and they didn't change that to integer.
I'll look at MultiErrors.. I was hoping there was some way to match it to the line number that it occurs at to match up to it in an editor. Makes it hard for us to visually mark the error in an editor without knowing where it occurs.
When calling the Validate function after loading an OpenAPI doc, whenever there is a failure.. in my case an invalid paths error is thrown, with unsupported 'format' value 'int64'.. which is NOT invalid.. I have no idea where in the file being parsed the error is at. Even more odd is that if I keep running the same validate call, sometimes I get a little more info back.. no idea why its random.. but in this particular file most of the time the error is:
invalid paths: unsupported 'format' value "int64"
But sometimes it says:
invalid paths: parameter "dateRangeFrom" schema is invalid: unsupported 'format' value "int64"
I figured out the actual reason the parsing fails.. but even so....
Is there any way to get the error line of the parsing error? Any idea why the response to the validation error changes?
The text was updated successfully, but these errors were encountered: