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
merged 7 commits into from Jun 28, 2018

Conversation

3 participants
@samuelcolvin
Owner

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')
@codecov

This comment has been minimized.

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

Open

Class variables? #184

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

This comment has been minimized.

@dsully

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

samuelcolvin Jun 11, 2018

Owner

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

@samuelcolvin

This comment has been minimized.

Owner

samuelcolvin commented Jun 13, 2018

Needs docs, but otherwise think this is ready.

@Gr1N

This comment has been minimized.

Collaborator

Gr1N commented Jun 25, 2018

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

@samuelcolvin

This comment has been minimized.

Owner

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
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
pyup.io/safety-ci No dependencies with known security vulnerabilities.
Details

@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