Skip to content

Commit 6dfd9b8

Browse files
Generate stackitmarketplace
1 parent de673ff commit 6dfd9b8

File tree

5 files changed

+46
-10
lines changed

5 files changed

+46
-10
lines changed

services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def _approve_subscription_serialize(
346346
@validate_call
347347
def get_catalog_product(
348348
self,
349-
product_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The product ID.")],
349+
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")],
350350
locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None,
351351
_request_timeout: Union[
352352
None,
@@ -414,7 +414,7 @@ def get_catalog_product(
414414
@validate_call
415415
def get_catalog_product_with_http_info(
416416
self,
417-
product_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The product ID.")],
417+
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")],
418418
locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None,
419419
_request_timeout: Union[
420420
None,
@@ -482,7 +482,7 @@ def get_catalog_product_with_http_info(
482482
@validate_call
483483
def get_catalog_product_without_preload_content(
484484
self,
485-
product_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The product ID.")],
485+
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")],
486486
locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None,
487487
_request_timeout: Union[
488488
None,
@@ -1501,7 +1501,7 @@ def list_vendor_subscriptions(
15011501
),
15021502
] = None,
15031503
product_id: Annotated[
1504-
Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
1504+
Optional[Annotated[str, Field(min_length=10, strict=True, max_length=29)]],
15051505
Field(description="The product ID."),
15061506
] = None,
15071507
_request_timeout: Union[
@@ -1593,7 +1593,7 @@ def list_vendor_subscriptions_with_http_info(
15931593
),
15941594
] = None,
15951595
product_id: Annotated[
1596-
Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
1596+
Optional[Annotated[str, Field(min_length=10, strict=True, max_length=29)]],
15971597
Field(description="The product ID."),
15981598
] = None,
15991599
_request_timeout: Union[
@@ -1685,7 +1685,7 @@ def list_vendor_subscriptions_without_preload_content(
16851685
),
16861686
] = None,
16871687
product_id: Annotated[
1688-
Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
1688+
Optional[Annotated[str, Field(min_length=10, strict=True, max_length=29)]],
16891689
Field(description="The product ID."),
16901690
] = None,
16911691
_request_timeout: Union[

services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_detail.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ class CatalogProductDetail(BaseModel):
7676
pricing_options: List[CatalogProductPricingOption] = Field(
7777
description="The list of pricing options.", alias="pricingOptions"
7878
)
79-
product_id: object = Field(alias="productId")
79+
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
80+
description="The user-readable product ID.", alias="productId"
81+
)
8082
summary: StrictStr = Field(description="The short summary of the product.")
8183
support_faq: Optional[Annotated[str, Field(strict=True, max_length=512)]] = Field(
8284
default=None, description="The support FAQ URL.", alias="supportFaq"
@@ -132,6 +134,13 @@ def name_validate_regular_expression(cls, value):
132134
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
133135
return value
134136

137+
@field_validator("product_id")
138+
def product_id_validate_regular_expression(cls, value):
139+
"""Validates the regular expression"""
140+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
141+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
142+
return value
143+
135144
@field_validator("support_faq")
136145
def support_faq_validate_regular_expression(cls, value):
137146
"""Validates the regular expression"""

services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ class CatalogProductOverview(BaseModel):
4747
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
4848
logo: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The logo base64 encoded.")
4949
name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The name of the product.")
50-
product_id: object = Field(alias="productId")
50+
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
51+
description="The user-readable product ID.", alias="productId"
52+
)
5153
summary: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The short summary of the product.")
5254
vendor: CatalogProductOverviewVendor
5355
__properties: ClassVar[List[str]] = [
@@ -67,6 +69,13 @@ def name_validate_regular_expression(cls, value):
6769
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
6870
return value
6971

72+
@field_validator("product_id")
73+
def product_id_validate_regular_expression(cls, value):
74+
"""Validates the regular expression"""
75+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
76+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
77+
return value
78+
7079
@field_validator("summary")
7180
def summary_validate_regular_expression(cls, value):
7281
"""Validates the regular expression"""

services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class InquiryContactSales(BaseModel):
3636
description="The full name of the contact person.", alias="fullName"
3737
)
3838
message: Annotated[str, Field(strict=True, max_length=512)] = Field(description="A custom message.")
39-
product_id: object = Field(alias="productId")
39+
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
40+
description="The user-readable product ID.", alias="productId"
41+
)
4042
__properties: ClassVar[List[str]] = ["companyName", "contactEmail", "fullName", "message", "productId"]
4143

4244
@field_validator("company_name")
@@ -60,6 +62,13 @@ def message_validate_regular_expression(cls, value):
6062
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
6163
return value
6264

65+
@field_validator("product_id")
66+
def product_id_validate_regular_expression(cls, value):
67+
"""Validates the regular expression"""
68+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
69+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
70+
return value
71+
6372
model_config = ConfigDict(
6473
populate_by_name=True,
6574
validate_assignment=True,

services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_product.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class SubscriptionProduct(BaseModel):
3838
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
3939
price_type: PriceType = Field(alias="priceType")
4040
pricing_plan: StrictStr = Field(description="Additional price type information.", alias="pricingPlan")
41-
product_id: object = Field(alias="productId")
41+
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
42+
description="The user-readable product ID.", alias="productId"
43+
)
4244
product_name: Annotated[str, Field(strict=True, max_length=512)] = Field(
4345
description="The name of the product.", alias="productName"
4446
)
@@ -63,6 +65,13 @@ class SubscriptionProduct(BaseModel):
6365
"vendorWebsiteUrl",
6466
]
6567

68+
@field_validator("product_id")
69+
def product_id_validate_regular_expression(cls, value):
70+
"""Validates the regular expression"""
71+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
72+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
73+
return value
74+
6675
@field_validator("product_name")
6776
def product_name_validate_regular_expression(cls, value):
6877
"""Validates the regular expression"""

0 commit comments

Comments
 (0)