Skip to content

Validate schema compliance at generation time #26

Description

@thclark

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++.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature roadmapped for implementation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions