Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/data/expected/main/jsonschema/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ class Info(BaseModel):
constr(regex=r'(^arn:([^:]*):([^:]*):([^:]*):(|\*|[\d]{12}):(.+)$)|^\*$') | None
) = None
tel: constr(regex=r'^(\([0-9]{3}\))?[0-9]{3}-[0-9]{4}$') | None = None
comment: constr(regex=r'[^\b\f\n\r\t\\a+.?\'"|()]+$') | None = None
comment: constr(regex=r'[^\x08\f\n\r\t\\a+.?\'"|()]+$') | None = None
4 changes: 2 additions & 2 deletions tests/data/expected/main/jsonschema/special_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class ModelEnum(Enum):
field__1 = '\n'
field__ = '\r\n'
field__2 = '\t'
field__3 = '\b'
field__4 = '\\'
field_x08 = '\\x08'
field__3 = '\\'


class Model(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class ModelEnum(Enum):
field_ = '\n'
field__ = '\r\n'
field__1 = '\t'
field__2 = '\b'
field__3 = '\\'
field_x08 = '\\x08'
field__2 = '\\'


class Model(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class ModelEnum(Enum):
special__1 = '\n'
special__ = '\r\n'
special__2 = '\t'
special__3 = '\b'
special__4 = '\\'
special_x08 = '\\x08'
special__3 = '\\'


class Model(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class ModelEnum(Enum):
__1 = '\n'
__ = '\r\n'
__2 = '\t'
__3 = '\b'
__4 = '\\'
_x08 = '\\x08'
__3 = '\\'


class Model(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/openapi/pattern/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ class Info(BaseModel):
constr(regex=r'(^arn:([^:]*):([^:]*):([^:]*):(|\*|[\d]{12}):(.+)$)|^\*$') | None
) = None
tel: constr(regex=r'^(\([0-9]{3}\))?[0-9]{3}-[0-9]{4}$') | None = None
comment: constr(regex=r'[^\b\f\n\r\t\\a+.?\'"|()]+$') | None = None
comment: constr(regex=r'[^\x08\f\n\r\t\\a+.?\'"|()]+$') | None = None
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ class Info(Struct):
Annotated[str, Meta(pattern='^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$')] | UnsetType
) = UNSET
comment: (
Annotated[str, Meta(pattern='[^\\b\\f\\n\\r\\t\\\\a+.?\'"|()]+$')] | UnsetType
Annotated[str, Meta(pattern='[^\\x08\\f\\n\\r\\t\\\\a+.?\'"|()]+$')] | UnsetType
) = UNSET
2 changes: 1 addition & 1 deletion tests/data/expected/main/openapi/pattern/pydantic_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class Info(BaseModel):
| None
) = None
tel: constr(pattern=r'^(\([0-9]{3}\))?[0-9]{3}-[0-9]{4}$') | None = None
comment: constr(pattern=r'[^\b\f\n\r\t\\a+.?\'"|()]+$') | None = None
comment: constr(pattern=r'[^\x08\f\n\r\t\\a+.?\'"|()]+$') | None = None
4 changes: 2 additions & 2 deletions tests/data/jsonschema/pattern.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"comment": {
"type": "string",
"pattern": "[^\b\f\n\r\t\\\\a+.?'\"|()]+$"
"pattern": "[^\\x08\\f\\n\\r\\t\\\\a+.?'\"|()]+$"
}
}
}
}
4 changes: 2 additions & 2 deletions tests/data/jsonschema/special_enum.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"\n",
"\r\n",
"\t",
"\b",
"\\x08",
null,
"\\"
]
}
}
2 changes: 1 addition & 1 deletion tests/data/openapi/pattern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ components:
pattern: '^(\([0-9]{3}\))?[0-9]{3}-[0-9]{4}$'
comment:
type: string
pattern: '[^\b\f\n\r\t\\a+.?''"|()]+$'
pattern: '[^\x08\f\n\r\t\\a+.?''"|()]+$'
Loading