Closed JackKelly-Bellroy closed 1 year ago
@JackKelly-Bellroy Hi there!
autodocodec-schema
was initially there just to make autodocodec-yaml
work, but turned into its own thing. I have no grand plan for where to go with it.
I see no issues with the changes you've expressed here. There are some requirements, which I think you'll agree with;
nix flake check
needs to continue to succeed.To answer your questions:
are you able to accept PRs for them
Yes
Sounds good. We'll give autodocodec-schemas
a go, and if it looks promising, we'll send some PRs your way to fill in the gaps. Thanks!
We're considering trialling
autodocodec-schema
for a project, but its validation support doesn't seem to do everything that we'd need. TheAutodocodec.Schema.JSONSchema
type notes "this schema roundtrips to JSON, but it cannot expres[s] everything that a fully-featured json-schema may be able to express". Forautodocodec-schema
to be more useful on our project, we'd want it to be able to:Value
against a schema which contains$ref
s to other schemas. This could mean adding a variant ofvalidateAccordingTo
which takes aMap SchemaURI JSONSchema
and using it like the one inside the state monad insidevalidateAccordingTo
."enum"
and"const"
keywords, etc.Are these sort of uses in-scope for the design and goals of
autodocodec-schema
, and are you able to accept PRs for them if we ended up building on top of it?