Skip to content

Releases: oxidizing/conformist

0.8.1

05 Apr 12:58
Compare
Choose a tag to compare

Fixed

  • Run decoder only once

0.8.0

11 Jan 13:26
Compare
Choose a tag to compare

Fixed

  • Correctly handle optionals with no provided defaults

0.7.0

18 Nov 08:52
Compare
Choose a tag to compare

Added

  • Make functor to customize the error type and the error messages, which be default English strings

0.6.0

30 Apr 13:43
Compare
Choose a tag to compare

Added

  • Add Conformist.list to support decoding list of 'a

Changed

  • Conformist.Field.optional is now Conformist.Field.is_optional to avoid confusion with Conformist.optional
  • The encoded value is assumed to be string list instead of string. This is preparation to support decoding of a list of strings.

0.5.0

30 Apr 13:42
Compare
Choose a tag to compare

Added

  • Conformist type datetime that decodes to Ptime.t. This replaces date which has been deprecated.

0.4.0

25 Mar 14:58
Compare
Choose a tag to compare

CHANGES:

Changed

  • decode, validate and decode_and_validate all return the same error type

Added

  • Improve error reporting by printing provided input values (list of values)

0.3.0

25 Mar 10:33
Compare
Choose a tag to compare

CHANGES:

Changed

  • decode returns a triple containing (field_name, input, error_msg) instead of a concatenated string. This makes it easier to extract information.

Added

  • decode_and_validate combines decode and validate where the returned value is either the decoded value or a list of errors. When using decode_and_validate, one can forget about the difference between decode and validate and simply forward the list of errors. This covers a common use case.

0.2.1

16 Mar 15:01
Compare
Choose a tag to compare

CHANGES:

Changed

  • Replace ppx_deriving with sexplib

0.1.0

29 Sep 15:22
Compare
Choose a tag to compare

CHANGES:

[0.1.0] - 2020-09-29

Added

  • Conformist.Field.type_ can be used to retrieve a string representation of the type
  • Support for custom encoders for custom types
  • Support for encoding default values if present, this can be used to print schemas

Fixed

  • Move mandatory field name parameter to the end of create functions in order to get rid of the trailing () argument

[0.0.2] - 2020-09-29

Fixed

  • Move fold_left to top level module and accept Conformist.t as input

[0.0.1] - 2020-09-20

Added

  • Initial release supporting int, float, string, bool, Ptime.date and custom types

0.0.2

29 Sep 13:24
Compare
Choose a tag to compare

CHANGES:

[0.0.2] - 2020-09-29

Fixed

  • Move fold_left to top level module and accept Conformist.t as input

[0.0.1] - 2020-09-20

Added

  • Initial release supporting int, float, string, bool, Ptime.date and custom types