Skip to content

Commit c66622f

Browse files
Generate postgresflex
1 parent 1616198 commit c66622f

7 files changed

Lines changed: 19 additions & 19 deletions

File tree

‎services/postgresflex/oas_commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1fdef398bea59d49731a7d9ac39394ba5b6bb72c
1+
ef9232ba8d49c72fc3397a365b09ca1a8205b25e

‎services/postgresflex/src/stackit/postgresflex/models/create_database_payload.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CreateDatabasePayload(BaseModel):
3030
""" # noqa: E501
3131

3232
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
33-
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
33+
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, underscores, or hyphens. It cannot end with a hyphen." '
3434
)
3535
owner: Optional[StrictStr] = Field(default=None, description="The owner of the database.")
3636
__properties: ClassVar[List[str]] = ["name", "owner"]
@@ -41,8 +41,8 @@ def name_validate_regular_expression(cls, value):
4141
if not isinstance(value, str):
4242
value = str(value)
4343

44-
if not re.match(r"^[a-z_][a-z0-9_]*$", value):
45-
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
44+
if not re.match(r"^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$", value):
45+
raise ValueError(r"must validate the regular expression /^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$/")
4646
return value
4747

4848
model_config = ConfigDict(

‎services/postgresflex/src/stackit/postgresflex/models/database_roles.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DatabaseRoles(BaseModel):
3030
""" # noqa: E501
3131

3232
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
33-
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
33+
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, underscores, or hyphens. It cannot end with a hyphen." '
3434
)
3535
roles: List[StrictStr] = Field(description="The name and the roles for a database")
3636
__properties: ClassVar[List[str]] = ["name", "roles"]
@@ -41,8 +41,8 @@ def name_validate_regular_expression(cls, value):
4141
if not isinstance(value, str):
4242
value = str(value)
4343

44-
if not re.match(r"^[a-z_][a-z0-9_]*$", value):
45-
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
44+
if not re.match(r"^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$", value):
45+
raise ValueError(r"must validate the regular expression /^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$/")
4646
return value
4747

4848
model_config = ConfigDict(

‎services/postgresflex/src/stackit/postgresflex/models/get_database_response.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class GetDatabaseResponse(BaseModel):
3131

3232
id: StrictInt = Field(description="The id of the database.")
3333
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
34-
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
34+
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, underscores, or hyphens. It cannot end with a hyphen." '
3535
)
3636
owner: StrictStr = Field(description="The owner of the database.")
3737
__properties: ClassVar[List[str]] = ["id", "name", "owner"]
@@ -42,8 +42,8 @@ def name_validate_regular_expression(cls, value):
4242
if not isinstance(value, str):
4343
value = str(value)
4444

45-
if not re.match(r"^[a-z_][a-z0-9_]*$", value):
46-
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
45+
if not re.match(r"^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$", value):
46+
raise ValueError(r"must validate the regular expression /^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$/")
4747
return value
4848

4949
model_config = ConfigDict(

‎services/postgresflex/src/stackit/postgresflex/models/list_database.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ListDatabase(BaseModel):
3131

3232
id: StrictInt = Field(description="The id of the database.")
3333
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
34-
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
34+
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, underscores, or hyphens. It cannot end with a hyphen." '
3535
)
3636
owner: StrictStr = Field(description="The owner of the database.")
3737
__properties: ClassVar[List[str]] = ["id", "name", "owner"]
@@ -42,8 +42,8 @@ def name_validate_regular_expression(cls, value):
4242
if not isinstance(value, str):
4343
value = str(value)
4444

45-
if not re.match(r"^[a-z_][a-z0-9_]*$", value):
46-
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
45+
if not re.match(r"^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$", value):
46+
raise ValueError(r"must validate the regular expression /^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$/")
4747
return value
4848

4949
model_config = ConfigDict(

‎services/postgresflex/src/stackit/postgresflex/models/partial_update_database_payload.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class PartialUpdateDatabasePayload(BaseModel):
3131

3232
name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=63)]] = Field(
3333
default=None,
34-
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." ',
34+
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, underscores, or hyphens. It cannot end with a hyphen." ',
3535
)
3636
owner: Optional[StrictStr] = Field(default=None, description="The owner of the database.")
3737
__properties: ClassVar[List[str]] = ["name", "owner"]
@@ -45,8 +45,8 @@ def name_validate_regular_expression(cls, value):
4545
if not isinstance(value, str):
4646
value = str(value)
4747

48-
if not re.match(r"^[a-z_][a-z0-9_]*$", value):
49-
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
48+
if not re.match(r"^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$", value):
49+
raise ValueError(r"must validate the regular expression /^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$/")
5050
return value
5151

5252
model_config = ConfigDict(

‎services/postgresflex/src/stackit/postgresflex/models/update_database_payload.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class UpdateDatabasePayload(BaseModel):
3030
""" # noqa: E501
3131

3232
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
33-
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
33+
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, underscores, or hyphens. It cannot end with a hyphen." '
3434
)
3535
owner: StrictStr = Field(description="The owner of the database.")
3636
__properties: ClassVar[List[str]] = ["name", "owner"]
@@ -41,8 +41,8 @@ def name_validate_regular_expression(cls, value):
4141
if not isinstance(value, str):
4242
value = str(value)
4343

44-
if not re.match(r"^[a-z_][a-z0-9_]*$", value):
45-
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
44+
if not re.match(r"^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$", value):
45+
raise ValueError(r"must validate the regular expression /^[a-z_]([a-z0-9_\-]{0,61}[a-z0-9_])?$/")
4646
return value
4747

4848
model_config = ConfigDict(

0 commit comments

Comments
 (0)