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
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Release (2025-xx-xx)
- `stackitmarketplace`: [v1.10.0](services/stackitmarketplace/CHANGELOG.md#v1100)
- **Feature:** Added `PlanId` to `CatalogProductPricingOption`and `SubscriptionProduct`
- `stackitmarketplace`:
- [v1.11.0](services/stackitmarketplace/CHANGELOG.md#v1110)
- **Feature:** Add new field `DemoUrl` to `CatalogProductDetail` model
- [v1.10.0](services/stackitmarketplace/CHANGELOG.md#v1100)
- **Feature:** Added `PlanId` to `CatalogProductPricingOption` and `SubscriptionProduct`

## Release (2025-09-11)
- `cdn`: [v1.6.0](services/cdn/CHANGELOG.md#v160)
Expand Down
5 changes: 4 additions & 1 deletion services/stackitmarketplace/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## v1.11.0
- **Feature:** Add new field `DemoUrl` to `CatalogProductDetail` model

## v1.10.0
- **Feature:** Added `PlanId` to `CatalogProductPricingOption`and `SubscriptionProduct`
- **Feature:** Added `PlanId` to `CatalogProductPricingOption` and `SubscriptionProduct`

## v1.9.0
- **Feature:** Added `RequestPrivatePlan` to `InquiriesCreateInquiryPayload`
Expand Down
2 changes: 1 addition & 1 deletion services/stackitmarketplace/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-stackitmarketplace"

[tool.poetry]
name = "stackit-stackitmarketplace"
version = "v1.10.0"
version = "v1.11.0"
authors = [
"STACKIT Developer Tools <[email protected]>",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class CatalogProductDetail(BaseModel):
default=None, description="The list of categories associated to the product."
)
delivery_method: DeliveryMethod = Field(alias="deliveryMethod")
demo_url: Optional[Annotated[str, Field(strict=True, max_length=512)]] = Field(
default=None, description="The URL to a demo if available.", alias="demoUrl"
)
description: StrictStr = Field(description="The product description.")
documentation_url: Annotated[str, Field(strict=True, max_length=512)] = Field(
description="The documentation URL.", alias="documentationUrl"
Expand Down Expand Up @@ -108,6 +111,7 @@ class CatalogProductDetail(BaseModel):
"assets",
"categories",
"deliveryMethod",
"demoUrl",
"description",
"documentationUrl",
"email",
Expand All @@ -129,6 +133,18 @@ class CatalogProductDetail(BaseModel):
"videoUrl",
]

@field_validator("demo_url")
def demo_url_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if value is None:
return value

if not re.match(r"^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$", value):
raise ValueError(
r"must validate the regular expression /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/"
)
return value

@field_validator("documentation_url")
def documentation_url_validate_regular_expression(cls, value):
"""Validates the regular expression"""
Expand Down Expand Up @@ -260,6 +276,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"assets": Assets.from_dict(obj["assets"]) if obj.get("assets") is not None else None,
"categories": obj.get("categories"),
"deliveryMethod": obj.get("deliveryMethod"),
"demoUrl": obj.get("demoUrl"),
"description": obj.get("description"),
"documentationUrl": obj.get("documentationUrl"),
"email": obj.get("email"),
Expand Down