Commit Graph

5 Commits

Author SHA1 Message Date
Eric Jolibois 1c3ef841e6 feat: add validator for None, NoneType or Literal[None] (#2149)
* feat: add validator for NoneType

closes #2095

* feat: support NoneType directly as type

* chore: add change file

* chore: fix typo

* fix: handle Literal[None] for python3.6/3.7 without typing_extensions

* chore: move NotNoneError and export it

* chore: use constant NONE_TYPES to simplify a bit

* chore: use check on Literal instead of typing_extensions

These tests would not run on python 3.8+ without typing_extensions
even though Literal is defined

* test: use fresh Literal[None] in test case

* feat: handle `None` type in schema

* docs: add NoneType documentation

* refactor: switch NONE_TYPES from tuple to set
2021-01-01 14:01:25 +00:00
Matthew Davis 9cb7ca744b add NonPositive/NonNegative Int/Float (#1987)
fix #1975

* add NonPositive/NonNegative Int/Float

* delete data.json file
2020-11-29 16:07:51 +00:00
PrettyWood 55e78cc106 fix(schema): add basic support of Pattern type in schema generation (#1768)
closes #1767
2020-10-08 20:42:14 +01:00
Samuel Colvin 065ae2e4c4 fix modify schema (#1103)
* modify schema, fix #1102

* remove DSN from schema table

* fix tests

* add outer_type_ to ModelField, fix coverage

* simplify ModelField._type_display

* remove debugs

* revert change to _type_display

* test fix
2019-12-21 15:46:11 +00:00
Samuel Colvin 33b7d52d31 moving docs to mkdocs (#856)
* moving docs to mkdocs

* transfering readme to md and more

* fixing build

* splitting usage.md

* improving schema.md and index.md

* fix make_history.rst

* models intro

* working on data conversation and required fields

* more fixes to models.md

* list all standard types supported

* list of pydantic types

* tweaks

* update links in code

* Apply suggestions from code review

incorporate @dmontagu's suggestions.

Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>

* Apply suggestions from code review

more missed suggestions.

Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>

* Apply suggestions from code review

more corrects.

* cleanup

* Field order warning

* fix and regenerate benchmarks

* format examples better, cleanup

* improve schema mapping table

* correct highlighting file types in schema.md

* add redirects in javascript

* add logo
2019-10-07 17:19:01 +01:00