Skip to content

reification based on examples #15

@Benjmhart

Description

@Benjmhart

Would be great to automate the schema creation - even if it's crude at first, as a developer tool.

Admittedly, in many cases this may be an anti-pattern, however it can quickly aide in the creation of a schema - particularly when working with poorly documented API's, or when building parsers on one side of an integration, which must agree with an existing implementation.

Ideally i see this as a function [JSON] -> Schema, which can then be rendered out to a file.

Even if this is just the primitive assignments without any fancy string subtypes or other features, it should be reasonable to generate a schema which would fit all provided examples, Quickcheck could assist this process using existing Gen a -> [a] functions.

the rapid development advantages here could make this a great utility, even with appropriate warnings that the schema itself should be treated as the source of truth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions