Skip to content

Commit

Permalink
Merge pull request #122 from seandstewart/patch/fix-jsonschema-format…
Browse files Browse the repository at this point in the history
…-serialization

Fix Regression with JSON Schema Generation
  • Loading branch information
seandstewart committed Aug 8, 2020
2 parents 54c1e31 + 712f91c commit a7379b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
@@ -1,7 +1,7 @@
[tool.poetry]
name = "typical"
packages = [{include = "typic"}]
version = "2.0.27"
version = "2.0.28"
description = "Typical: Python's Typing Toolkit."
authors = ["Sean Stewart <sean_stewart@me.com>"]
license = "MIT"
Expand Down
1 change: 1 addition & 0 deletions typic/ext/schema/field.py
Expand Up @@ -223,6 +223,7 @@ class StrSchemaField(BaseSchemaField):
"""

type = SchemaType.STR
format: Optional[StringFormat] = None
pattern: Optional[Pattern] = None
minLength: Optional[int] = None
maxLength: Optional[int] = None
Expand Down
2 changes: 1 addition & 1 deletion typic/serde/ser.py
Expand Up @@ -503,7 +503,7 @@ def _build_class_serializer(

self._finalize_mapping_serializer(func, serdict, annotation)

def _compile_enum_serializer(self, annotation: "Annotation",) -> SerializerT:
def _compile_enum_serializer(self, annotation: "Annotation") -> SerializerT:
origin: Type[enum.Enum] = cast(Type[enum.Enum], annotation.resolved_origin)
ts = {type(x.value) for x in origin}
# If we can predict a single type the return the serializer for that
Expand Down

0 comments on commit a7379b8

Please sign in to comment.