Skip to content
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

Validate schema compliance at generation time #26

Open
thclark opened this issue May 5, 2021 · 0 comments
Open

Validate schema compliance at generation time #26

thclark opened this issue May 5, 2021 · 0 comments
Labels
feature Feature roadmapped for implementation

Comments

@thclark
Copy link
Owner

thclark commented May 5, 2021

Plotly provides a JSONSchema for graph objects which, assuming the schema is correct, should guarantee that the output is renderable.

Currently, production of figures can be hit-and-miss, since the outgoing JSON is not validated against the schema. If there is an error in production of the graph, there will be no way of knowing this until it's rendered (or not) and no meaningful information about why; unless you also know enough about javascript to be introspecting the errors on display-side.

Addition of a validate option would enable users to check that their JSON is plotly-compliant against the schema as the JSON is generated, as opposed to some time later when it's viewed; and create reasonable-looking error messages in the event of non-compliance.

I don't believe it's possible to do this at compile-time whilst still supporting modern features of C++.

@thclark thclark added the feature Feature roadmapped for implementation label May 5, 2021
@thclark thclark changed the title Schema compliance at generation time Validate schema compliance at generation time May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature roadmapped for implementation
Projects
None yet
Development

No branches or pull requests

1 participant