Skip to content

Commit 37c2edd

Browse files
Generator: Update SDK /services/stackitmarketplace (#1047)
* Generate stackitmarketplace * chore(sdk): update changelogs --------- Co-authored-by: Rüdiger Schmitz <[email protected]>
1 parent ae2ea0f commit 37c2edd

File tree

8 files changed

+86
-18
lines changed

8 files changed

+86
-18
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## Release (2025-05-XX)
2+
- `stackitmarketplace`[v1.0.0](services/stackitmarketplace/CHANGELOG.md#v100-2025-05-05)
3+
- **Breaking Change:**
4+
- Introduced dedicated type for product id with appropriate validations
5+
- **Feature:**
6+
- subscription products contain the plan id
7+
18
## Release (2025-04-30)
29
- `stackitmarketplace`: [v0.4.0](services/stackitmarketplace/CHANGELOG.md#v040-2025-04-16)
310
- **Feature:** Add new `InquiryContactSales`, `InquirySuggestProduct`, `PriceType`, `PricingOption` and `DeliveryMethod`

services/stackitmarketplace/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v1.0.0 (2025-05-05)
2+
- **Breaking Change:**
3+
- Introduced dedicated type for product id with appropriate validations
4+
- **Feature:**
5+
- subscription products contain the plan id
6+
17
## v0.4.0 (2025-04-16)
28
- **Feature:** Add new `InquiryContactSales`, `InquirySuggestProduct`, `PriceType`, `PricingOption` and `DeliveryMethod`
39

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

Lines changed: 12 additions & 12 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,
@@ -1132,7 +1132,7 @@ def list_catalog_products(
11321132
sort: Annotated[
11331133
Optional[StrictStr],
11341134
Field(
1135-
description="Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`."
1135+
description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`."
11361136
),
11371137
] = None,
11381138
_request_timeout: Union[
@@ -1157,7 +1157,7 @@ def list_catalog_products(
11571157
:type locale: str
11581158
:param filter: Filter the products based on attributes. E.g `deliveryMethod eq \"SAAS\"`. The supported attributes are `deliveryMethod`, `priceType`, `category`, `vendorId`, `vendorName`, and `name`. The supported operators are `eq`. Filters can be joined with `and` or `or`.
11591159
:type filter: str
1160-
:param sort: Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`.
1160+
:param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`.
11611161
:type sort: str
11621162
:param _request_timeout: timeout setting for this request. If one
11631163
number provided, it will be total request
@@ -1235,7 +1235,7 @@ def list_catalog_products_with_http_info(
12351235
sort: Annotated[
12361236
Optional[StrictStr],
12371237
Field(
1238-
description="Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`."
1238+
description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`."
12391239
),
12401240
] = None,
12411241
_request_timeout: Union[
@@ -1260,7 +1260,7 @@ def list_catalog_products_with_http_info(
12601260
:type locale: str
12611261
:param filter: Filter the products based on attributes. E.g `deliveryMethod eq \"SAAS\"`. The supported attributes are `deliveryMethod`, `priceType`, `category`, `vendorId`, `vendorName`, and `name`. The supported operators are `eq`. Filters can be joined with `and` or `or`.
12621262
:type filter: str
1263-
:param sort: Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`.
1263+
:param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`.
12641264
:type sort: str
12651265
:param _request_timeout: timeout setting for this request. If one
12661266
number provided, it will be total request
@@ -1338,7 +1338,7 @@ def list_catalog_products_without_preload_content(
13381338
sort: Annotated[
13391339
Optional[StrictStr],
13401340
Field(
1341-
description="Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`."
1341+
description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`."
13421342
),
13431343
] = None,
13441344
_request_timeout: Union[
@@ -1363,7 +1363,7 @@ def list_catalog_products_without_preload_content(
13631363
:type locale: str
13641364
:param filter: Filter the products based on attributes. E.g `deliveryMethod eq \"SAAS\"`. The supported attributes are `deliveryMethod`, `priceType`, `category`, `vendorId`, `vendorName`, and `name`. The supported operators are `eq`. Filters can be joined with `and` or `or`.
13651365
:type filter: str
1366-
:param sort: Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`.
1366+
:param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`.
13671367
:type sort: str
13681368
:param _request_timeout: timeout setting for this request. If one
13691369
number provided, it will be total request
@@ -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/configuration.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# coding: utf-8
22

3+
import sys
4+
5+
import os
6+
7+
38
"""
49
STACKIT Marketplace API
510
@@ -12,8 +17,6 @@
1217
Do not edit the class manually.
1318
""" # noqa: E501 docstring might be too long
1419

15-
import os
16-
1720

1821
class HostConfiguration:
1922
def __init__(
@@ -30,6 +33,7 @@ def __init__(
3033
"as a function argument instead of being set in the client configuration.\n"
3134
"Once all services have migrated, the methods to specify the region in the client configuration "
3235
"will be removed.",
36+
file=sys.stderr,
3337
)
3438
"""Constructor
3539
"""

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: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,18 @@ 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
)
4547
vendor_name: Annotated[str, Field(strict=True, max_length=512)] = Field(
4648
description="The product's vendor name.", alias="vendorName"
4749
)
50+
vendor_plan_id: Optional[Annotated[str, Field(strict=True)]] = Field(
51+
default=None, description="The vendor provided plan ID.", alias="vendorPlanId"
52+
)
4853
vendor_product_id: Optional[Annotated[str, Field(strict=True)]] = Field(
4954
default=None, description="The vendor provided product ID.", alias="vendorProductId"
5055
)
@@ -59,10 +64,18 @@ class SubscriptionProduct(BaseModel):
5964
"productId",
6065
"productName",
6166
"vendorName",
67+
"vendorPlanId",
6268
"vendorProductId",
6369
"vendorWebsiteUrl",
6470
]
6571

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+
6679
@field_validator("product_name")
6780
def product_name_validate_regular_expression(cls, value):
6881
"""Validates the regular expression"""
@@ -77,6 +90,16 @@ def vendor_name_validate_regular_expression(cls, value):
7790
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
7891
return value
7992

93+
@field_validator("vendor_plan_id")
94+
def vendor_plan_id_validate_regular_expression(cls, value):
95+
"""Validates the regular expression"""
96+
if value is None:
97+
return value
98+
99+
if not re.match(r"^[a-zA-Z0-9](?:[a-zA-Z0-9_+&-]){0,39}$", value):
100+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9](?:[a-zA-Z0-9_+&-]){0,39}$/")
101+
return value
102+
80103
@field_validator("vendor_product_id")
81104
def vendor_product_id_validate_regular_expression(cls, value):
82105
"""Validates the regular expression"""
@@ -153,6 +176,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
153176
"productId": obj.get("productId"),
154177
"productName": obj.get("productName"),
155178
"vendorName": obj.get("vendorName"),
179+
"vendorPlanId": obj.get("vendorPlanId"),
156180
"vendorProductId": obj.get("vendorProductId"),
157181
"vendorWebsiteUrl": obj.get("vendorWebsiteUrl"),
158182
}

0 commit comments

Comments
 (0)