-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Test mock with numeric "offsetgroup" value #4705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The number is casted to string in this case. offsetgroup = "0" |
@archmoj thanks for the info. I understand that Plotly does this. Maybe I phrased this incorrectly. What I need to know is can the Mock that uses a numeric value be considered incorrect? Just for some background - I am setting up a round-trip test for a Scala wrapper to read and output the Plotly JSON documents according to the schema (much of the code is generated automatically via the schema). This means that it is not trivial to add support for such conversions or even support deprecated elements. In such cases, I will opt to change the mocks but must ensure that these changes are correct. Hence the question: is the mock incorrect and will the change I make (use a string) be in accordance with the schema (i.e.: not a schema error)? Appreciate any feedback on this. |
In general we accept numbers in string fields. I wouldn't exactly recommend it, but it is officially supported and they get cast to strings. The only exception is attributes labeled |
For the Scala wrapper I will assume "strict" and use numeric values only. Easier to maintain the mock change. Thanks. |
The mock bar-alignment-offset.json has the following trace:
Note that the
"offsetgroup"
has a numeric value. But the schema indicates:The few examples I have found in Plotly's Github and project/product sites seem to use strings. Is the mock incorrect?
TIA
The text was updated successfully, but these errors were encountered: