Skip to content

Commit 7562d0d

Browse files
Generator: Update SDK /services/stackitmarketplace (#1253)
* Generate stackitmarketplace * Update CHANGELOG.md and pyproject.toml --------- Co-authored-by: Marcel Jacek <[email protected]>
1 parent 540dc9d commit 7562d0d

File tree

6 files changed

+70
-8
lines changed

6 files changed

+70
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
- **Feature:** Delete Project labels using the new method `DeleteProjectLabels`
55
- **Feature:** List folders using the new method `ListFolders`
66
- **Feature:** Partial Update Organization using the new method `PartialUpdateOrganization`
7+
- `stackitmarketplace`: [v1.2.0](services/stackitmarketplace/CHANGELOG.md#v120-2025-06-06)
8+
- **Fix:** Fixed types for `VendorId`, `ProjectId`, `OrganizationId` and `SubscriptionId`
9+
710

811
## Release (2025-06-03)
912

services/stackitmarketplace/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# v1.2.0 (2025-06-06)
2+
- **Fix:** Fixed types for `VendorId`, `ProjectId`, `OrganizationId` and `SubscriptionId`
3+
14
## v1.1.3 (2025-06-02)
25
- **Feature:** Added `industries` to `CatalogProductDetail`
36

services/stackitmarketplace/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-stackitmarketplace"
33

44
[tool.poetry]
55
name = "stackit-stackitmarketplace"
6-
version = "v1.1.3"
6+
version = "v1.2.0"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class CatalogProductDetailsVendor(BaseModel):
3838
description: StrictStr = Field(description="The vendor description.")
3939
logo: Union[StrictBytes, StrictStr] = Field(description="The logo base64 encoded.")
4040
name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The product's vendor name.")
41-
vendor_id: object = Field(alias="vendorId")
41+
vendor_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
42+
description="Universally Unique Identifier (UUID).", alias="vendorId"
43+
)
4244
video_url: Annotated[str, Field(strict=True, max_length=512)] = Field(
4345
description="The vendor video URL.", alias="videoUrl"
4446
)
@@ -54,6 +56,15 @@ def name_validate_regular_expression(cls, value):
5456
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
5557
return value
5658

59+
@field_validator("vendor_id")
60+
def vendor_id_validate_regular_expression(cls, value):
61+
"""Validates the regular expression"""
62+
if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value):
63+
raise ValueError(
64+
r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"
65+
)
66+
return value
67+
5768
@field_validator("video_url")
5869
def video_url_validate_regular_expression(cls, value):
5970
"""Validates the regular expression"""

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class CatalogProductOverviewVendor(BaseModel):
2929
"""
3030

3131
name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The product's vendor name.")
32-
vendor_id: object = Field(alias="vendorId")
32+
vendor_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
33+
description="Universally Unique Identifier (UUID).", alias="vendorId"
34+
)
3335
website_url: Annotated[str, Field(strict=True, max_length=512)] = Field(
3436
description="Uniform Resource Locator.", alias="websiteUrl"
3537
)
@@ -42,6 +44,15 @@ def name_validate_regular_expression(cls, value):
4244
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
4345
return value
4446

47+
@field_validator("vendor_id")
48+
def vendor_id_validate_regular_expression(cls, value):
49+
"""Validates the regular expression"""
50+
if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value):
51+
raise ValueError(
52+
r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"
53+
)
54+
return value
55+
4556
@field_validator("website_url")
4657
def website_url_validate_regular_expression(cls, value):
4758
"""Validates the regular expression"""

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

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616

1717
import json
1818
import pprint
19+
import re
1920
from typing import Any, ClassVar, Dict, List, Optional, Set
2021

21-
from pydantic import BaseModel, ConfigDict, Field
22-
from typing_extensions import Self
22+
from pydantic import BaseModel, ConfigDict, Field, field_validator
23+
from typing_extensions import Annotated, Self
2324

2425
from stackit.stackitmarketplace.models.subscription_lifecycle_state import (
2526
SubscriptionLifecycleState,
@@ -33,12 +34,45 @@ class VendorSubscription(BaseModel):
3334
"""
3435

3536
lifecycle_state: SubscriptionLifecycleState = Field(alias="lifecycleState")
36-
organization_id: object = Field(alias="organizationId")
37+
organization_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
38+
description="Universally Unique Identifier (UUID).", alias="organizationId"
39+
)
3740
product: SubscriptionProduct
38-
project_id: object = Field(alias="projectId")
39-
subscription_id: object = Field(alias="subscriptionId")
41+
project_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
42+
description="Universally Unique Identifier (UUID).", alias="projectId"
43+
)
44+
subscription_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
45+
description="Universally Unique Identifier (UUID).", alias="subscriptionId"
46+
)
4047
__properties: ClassVar[List[str]] = ["lifecycleState", "organizationId", "product", "projectId", "subscriptionId"]
4148

49+
@field_validator("organization_id")
50+
def organization_id_validate_regular_expression(cls, value):
51+
"""Validates the regular expression"""
52+
if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value):
53+
raise ValueError(
54+
r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"
55+
)
56+
return value
57+
58+
@field_validator("project_id")
59+
def project_id_validate_regular_expression(cls, value):
60+
"""Validates the regular expression"""
61+
if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value):
62+
raise ValueError(
63+
r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"
64+
)
65+
return value
66+
67+
@field_validator("subscription_id")
68+
def subscription_id_validate_regular_expression(cls, value):
69+
"""Validates the regular expression"""
70+
if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value):
71+
raise ValueError(
72+
r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"
73+
)
74+
return value
75+
4276
model_config = ConfigDict(
4377
populate_by_name=True,
4478
validate_assignment=True,

0 commit comments

Comments
 (0)