Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit67488de

Browse files
Generator: Update SDK /services/stackitmarketplace (#1256)
* Generate stackitmarketplace* Update CHANGELOG.md and pyproject.toml---------Co-authored-by: Marcel Jacek <Marcel.Jacek@stackit.cloud>
1 parente70d141 commit67488de

File tree

7 files changed

+117
-5
lines changed

7 files changed

+117
-5
lines changed

‎CHANGELOG.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
-**Feature:** Delete Project labels using the new method`DeleteProjectLabels`
77
-**Feature:** List folders using the new method`ListFolders`
88
-**Feature:** Partial Update Organization using the new method`PartialUpdateOrganization`
9-
-`stackitmarketplace`:[v1.2.0](services/stackitmarketplace/CHANGELOG.md#v120-2025-06-06)
10-
-**Fix:** Fixed types for`VendorId`,`ProjectId`,`OrganizationId` and`SubscriptionId`
9+
-`stackitmarketplace`:
10+
-[v1.3.0](services/stackitmarketplace/CHANGELOG.md#v130-2025-06-10)
11+
-**Feature:** Add new field`facets` in`ListCatalogProductsResponse`
12+
-[v1.2.0](services/stackitmarketplace/CHANGELOG.md#v120-2025-06-06)
13+
-**Fix:** Fixed types for`VendorId`,`ProjectId`,`OrganizationId` and`SubscriptionId`
1114

1215

1316
##Release (2025-06-03)

‎services/stackitmarketplace/CHANGELOG.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#v1.2.0 (2025-06-06)
1+
##v1.3.0 (2025-06-10)
2+
-**Feature:** Add new field`facets` in`ListCatalogProductsResponse`
3+
4+
##v1.2.0 (2025-06-06)
25
-**Fix:** Fixed types for`VendorId`,`ProjectId`,`OrganizationId` and`SubscriptionId`
36

47
##v1.1.3 (2025-06-02)

‎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.2.0"
6+
version ="v1.3.0"
77
authors = [
88
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
99
]

‎services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
fromstackit.stackitmarketplace.models.catalog_product_details_vendorimport (
4848
CatalogProductDetailsVendor,
4949
)
50+
fromstackit.stackitmarketplace.models.catalog_product_facets_value_innerimport (
51+
CatalogProductFacetsValueInner,
52+
)
5053
fromstackit.stackitmarketplace.models.catalog_product_highlightimport (
5154
CatalogProductHighlight,
5255
)

‎services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
fromstackit.stackitmarketplace.models.catalog_product_details_vendorimport (
2929
CatalogProductDetailsVendor,
3030
)
31+
fromstackit.stackitmarketplace.models.catalog_product_facets_value_innerimport (
32+
CatalogProductFacetsValueInner,
33+
)
3134
fromstackit.stackitmarketplace.models.catalog_product_highlightimport (
3235
CatalogProductHighlight,
3336
)
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# coding: utf-8
2+
3+
"""
4+
STACKIT Marketplace API
5+
6+
API to manage STACKIT Marketplace.
7+
8+
The version of the OpenAPI document: 1
9+
Contact: marketplace@stackit.cloud
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
"""# noqa: E501 docstring might be too long
14+
15+
from __future__importannotations
16+
17+
importjson
18+
importpprint
19+
fromtypingimportAny,ClassVar,Dict,List,Optional,Set
20+
21+
frompydanticimportBaseModel,ConfigDict,Field,StrictInt,StrictStr
22+
fromtyping_extensionsimportSelf
23+
24+
25+
classCatalogProductFacetsValueInner(BaseModel):
26+
"""
27+
CatalogProductFacetsValueInner
28+
"""
29+
30+
count:StrictInt=Field(description="The number of items associated with this facet value.")
31+
value:StrictStr=Field(description="The value of the facet.")
32+
__properties:ClassVar[List[str]]= ["count","value"]
33+
34+
model_config=ConfigDict(
35+
populate_by_name=True,
36+
validate_assignment=True,
37+
protected_namespaces=(),
38+
)
39+
40+
defto_str(self)->str:
41+
"""Returns the string representation of the model using alias"""
42+
returnpprint.pformat(self.model_dump(by_alias=True))
43+
44+
defto_json(self)->str:
45+
"""Returns the JSON representation of the model using alias"""
46+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47+
returnjson.dumps(self.to_dict())
48+
49+
@classmethod
50+
deffrom_json(cls,json_str:str)->Optional[Self]:
51+
"""Create an instance of CatalogProductFacetsValueInner from a JSON string"""
52+
returncls.from_dict(json.loads(json_str))
53+
54+
defto_dict(self)->Dict[str,Any]:
55+
"""Return the dictionary representation of the model using alias.
56+
57+
This has the following differences from calling pydantic's
58+
`self.model_dump(by_alias=True)`:
59+
60+
* `None` is only added to the output dict for nullable fields that
61+
were set at model initialization. Other fields with value `None`
62+
are ignored.
63+
"""
64+
excluded_fields:Set[str]=set([])
65+
66+
_dict=self.model_dump(
67+
by_alias=True,
68+
exclude=excluded_fields,
69+
exclude_none=True,
70+
)
71+
return_dict
72+
73+
@classmethod
74+
deffrom_dict(cls,obj:Optional[Dict[str,Any]])->Optional[Self]:
75+
"""Create an instance of CatalogProductFacetsValueInner from a dict"""
76+
ifobjisNone:
77+
returnNone
78+
79+
ifnotisinstance(obj,dict):
80+
returncls.model_validate(obj)
81+
82+
_obj=cls.model_validate({"count":obj.get("count"),"value":obj.get("value")})
83+
return_obj

‎services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_catalog_products_response.py‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
frompydanticimportBaseModel,ConfigDict,Field,StrictStr
2222
fromtyping_extensionsimportAnnotated,Self
2323

24+
fromstackit.stackitmarketplace.models.catalog_product_facets_value_innerimport (
25+
CatalogProductFacetsValueInner,
26+
)
2427
fromstackit.stackitmarketplace.models.catalog_product_overviewimport (
2528
CatalogProductOverview,
2629
)
@@ -34,11 +37,14 @@ class ListCatalogProductsResponse(BaseModel):
3437
cursor:StrictStr=Field(
3538
description="A pagination cursor that represents a position in the dataset. If given, results will be returned from the item after the cursor. If not given, results will be returned from the beginning."
3639
)
40+
facets:Optional[Dict[str,List[CatalogProductFacetsValueInner]]]=Field(
41+
default=None,description="A collection of facets, where each key represents a facet category."
42+
)
3743
items:List[CatalogProductOverview]
3844
limit:Union[
3945
Annotated[float,Field(le=100,strict=True,ge=0)],Annotated[int,Field(le=100,strict=True,ge=0)]
4046
]=Field(description="Limit for returned Objects.")
41-
__properties:ClassVar[List[str]]= ["cursor","items","limit"]
47+
__properties:ClassVar[List[str]]= ["cursor","facets","items","limit"]
4248

4349
model_config=ConfigDict(
4450
populate_by_name=True,
@@ -77,6 +83,13 @@ def to_dict(self) -> Dict[str, Any]:
7783
exclude=excluded_fields,
7884
exclude_none=True,
7985
)
86+
# override the default output from pydantic by calling `to_dict()` of each value in facets (dict of array)
87+
_field_dict_of_array= {}
88+
ifself.facets:
89+
for_keyinself.facets:
90+
ifself.facets[_key]isnotNone:
91+
_field_dict_of_array[_key]= [_item.to_dict()for_iteminself.facets[_key]]
92+
_dict["facets"]=_field_dict_of_array
8093
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
8194
_items= []
8295
ifself.items:
@@ -98,6 +111,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
98111
_obj=cls.model_validate(
99112
{
100113
"cursor":obj.get("cursor"),
114+
"facets":dict(
115+
(_k, [CatalogProductFacetsValueInner.from_dict(_item)for_itemin_v]if_visnotNoneelseNone)
116+
for_k,_vinobj.get("facets", {}).items()
117+
),
101118
"items": (
102119
[CatalogProductOverview.from_dict(_item)for_iteminobj["items"]]
103120
ifobj.get("items")isnotNone

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp