Skip to content

Releases: encode/typesystem

Version 0.4.1

18 Nov 11:53
e887641
Compare
Choose a tag to compare

Fixed

  • Broken reference in OAS 3 - #122

Version 0.4.0

22 Oct 12:29
2e9dc56
Compare
Choose a tag to compare

Added

  • Update JSON schema ref according to OAS 3: #/components/schemas/

Version 0.3.1

15 Oct 06:34
ca0c98a
Compare
Choose a tag to compare

Added

  • Email field (#111)
  • IPAddress field (#114)
  • URL field (#117)

Version 0.3.0

15 Sep 10:57
851b60f
Compare
Choose a tag to compare

Version 0.3.0 changes how Schema validators are created. In this release validators are created as instances of Schema.

import typesystem

artist_schema = typesystem.Schema(
    fields={
        "name": typesystem.String(max_length=100)
    }
)

definitions = typesystem.Definitions()
definitions["Artist"] = artist_schema

album_schema = typesystem.Schema(
    fields={
        "title": typesystem.String(max_length=100),
        "release_date": typesystem.Date(),
        "artist": typesystem.Reference("Artist", definitions=definitions)
    }
)

The output of validation is also a dict, so there's no need to serialize validated data.

album, error = album_schema.validate_or_error(data)

Version 0.3.0.dev2

13 Sep 05:59
Compare
Choose a tag to compare
0.3.0.dev2

Version 0.2.5

04 Sep 09:22
e806f2a
Compare
Choose a tag to compare

Added

  • added UUID field

0.3.0.dev1

31 Aug 11:16
Compare
Choose a tag to compare
fix publish script