Compare commits
4 Commits
v0.1.3.pos
...
v0.1.3.pos
| Author | SHA1 | Date | |
|---|---|---|---|
| 81c149120e | |||
| 171dddabab | |||
|
f0192ee6d3
|
|||
|
|
82feea0ab1 |
@@ -19,7 +19,6 @@ class StringTypeParser(GenericTypeParser):
|
||||
"maxLength": "max_length",
|
||||
"minLength": "min_length",
|
||||
"pattern": "pattern",
|
||||
"format": "format",
|
||||
}
|
||||
|
||||
format_type_mapping = {
|
||||
@@ -63,4 +62,8 @@ class StringTypeParser(GenericTypeParser):
|
||||
if format_type in self.format_pattern_mapping:
|
||||
mapped_properties["pattern"] = self.format_pattern_mapping[format_type]
|
||||
|
||||
if "json_schema_extra" not in mapped_properties:
|
||||
mapped_properties["json_schema_extra"] = {}
|
||||
mapped_properties["json_schema_extra"]["format"] = format_type
|
||||
|
||||
return mapped_type, mapped_properties
|
||||
|
||||
@@ -87,3 +87,8 @@ section-order=[
|
||||
"standard-library",
|
||||
]
|
||||
lines-after-imports = 2
|
||||
|
||||
|
||||
[tool.pyright]
|
||||
venvPath = "."
|
||||
venv = ".venv"
|
||||
|
||||
Reference in New Issue
Block a user