NorfairKing / autodocodec

self(auto)- documenting encoders and decoders
MIT License
121 stars 20 forks source link

Appetite for JSON Schema enhancements? #45

Closed JackKelly-Bellroy closed 1 year ago

JackKelly-Bellroy commented 1 year ago

We're considering trialling autodocodec-schema for a project, but its validation support doesn't seem to do everything that we'd need. The Autodocodec.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". For autodocodec-schema to be more useful on our project, we'd want it to be able to:

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?

NorfairKing commented 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;

  1. When not adding a feature, golden tests need to pass unchanged.
  2. When adding a feature, old non-golden tests need to continue to pass.
  3. Minimise breaking changes
  4. nix flake check needs to continue to succeed.

To answer your questions:

are you able to accept PRs for them

Yes

JackKelly-Bellroy commented 1 year ago

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!