Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schemas #190

merged 7 commits into from Jun 28, 2018


None yet
3 participants
Copy link

samuelcolvin commented Jun 3, 2018

implement #129

Sadly the syntax I has hoped to use (tuples of default, Schema) doesn't work since tuple packing with variable type annotations turns out to be a syntax error (referenced in parsing python/typing#258) it works with parentheses but that's annoying.

Instead I've moved the default declaration into the schema

class FoobarModel(BaseModel):
    foo: int = Schema(4, title='Foo Title')
    bar: str = Schema(..., description='this description of bar')

This comment has been minimized.

Copy link

codecov bot commented Jun 3, 2018

Codecov Report

Merging #190 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #190   +/-   ##
  Coverage     100%   100%           
  Files          10     10           
  Lines        1209   1253   +44     
  Branches      224    232    +8     
+ Hits         1209   1253   +44

@samuelcolvin samuelcolvin referenced this pull request Jun 11, 2018


Class variables? #184

@@ -32,11 +32,21 @@ class Validator(NamedTuple):
check_fields: bool

class Schema:

This comment has been minimized.


dsully Jun 11, 2018

Adding a docstring and/or comment would be helpful here to know what this class is for.

This comment has been minimized.


samuelcolvin Jun 11, 2018

Author Owner

will do, I need to do docs for this in general.


This comment has been minimized.

Copy link
Owner Author

samuelcolvin commented Jun 13, 2018

Needs docs, but otherwise think this is ready.


This comment has been minimized.

Copy link

Gr1N commented Jun 25, 2018

@samuelcolvin PR looks great! When you're plan to merge and release change?


This comment has been minimized.

Copy link
Owner Author

samuelcolvin commented Jun 25, 2018

Just needs docs. I'll do it soon.

samuelcolvin added some commits Jun 28, 2018

@samuelcolvin samuelcolvin merged commit dd8d013 into master Jun 28, 2018

5 checks passed

codecov/project 100% (+0%) compared to f8c1a35
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
deploy/netlify Deploy preview ready!
Details No dependencies with known security vulnerabilities.

@samuelcolvin samuelcolvin deleted the schema branch Jun 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.