From ecc10b0595b94f95e1ef82da65e251c646da516b Mon Sep 17 00:00:00 2001 From: Dmitrii Gridnev Date: Thu, 20 Nov 2025 19:27:39 +0300 Subject: [PATCH] feat: release version 2.0.2 with additional custom field options - Updated version to 2.0.2 in pyproject.toml. - Enhanced CustomFieldOption model by adding new fields: slug, color, icon, is_default, read_only, is_active, is_internal, and behaviour. - Updated documentation for CustomFieldOption to reflect the new fields. This release improves the CustomFieldOption model, providing more flexibility in managing custom fields within the API client. --- qase-api-v2-client/docs/CustomFieldOption.md | 8 +++ qase-api-v2-client/pyproject.toml | 2 +- .../models/custom_field_option.py | 67 ++++++++++++++++++- 3 files changed, 73 insertions(+), 4 deletions(-) diff --git a/qase-api-v2-client/docs/CustomFieldOption.md b/qase-api-v2-client/docs/CustomFieldOption.md index f87c2be4..b67003c3 100644 --- a/qase-api-v2-client/docs/CustomFieldOption.md +++ b/qase-api-v2-client/docs/CustomFieldOption.md @@ -7,6 +7,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **title** | **str** | | [optional] +**slug** | **str** | | [optional] +**color** | **str** | | [optional] +**icon** | **str** | | [optional] +**is_default** | **bool** | | [optional] +**read_only** | **bool** | | [optional] +**is_active** | **bool** | | [optional] +**is_internal** | **bool** | | [optional] +**behaviour** | **int** | | [optional] ## Example diff --git a/qase-api-v2-client/pyproject.toml b/qase-api-v2-client/pyproject.toml index 6f92cee0..eb3eede7 100644 --- a/qase-api-v2-client/pyproject.toml +++ b/qase-api-v2-client/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-api-v2-client" -version = "2.0.1" +version = "2.0.2" description = "Qase TestOps API V2 client for Python" readme = "README.md" authors = [{name = "Qase Team", email = "support@qase.io"}] diff --git a/qase-api-v2-client/src/qase/api_client_v2/models/custom_field_option.py b/qase-api-v2-client/src/qase/api_client_v2/models/custom_field_option.py index 5154b494..7cd27d3d 100644 --- a/qase-api-v2-client/src/qase/api_client_v2/models/custom_field_option.py +++ b/qase-api-v2-client/src/qase/api_client_v2/models/custom_field_option.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,15 @@ class CustomFieldOption(BaseModel): """ # noqa: E501 id: Optional[StrictInt] = None title: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "title"] + slug: Optional[StrictStr] = None + color: Optional[StrictStr] = None + icon: Optional[StrictStr] = None + is_default: Optional[StrictBool] = None + read_only: Optional[StrictBool] = None + is_active: Optional[StrictBool] = None + is_internal: Optional[StrictBool] = None + behaviour: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "title", "slug", "color", "icon", "is_default", "read_only", "is_active", "is_internal", "behaviour"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +78,51 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if slug (nullable) is None + # and model_fields_set contains the field + if self.slug is None and "slug" in self.model_fields_set: + _dict['slug'] = None + + # set to None if color (nullable) is None + # and model_fields_set contains the field + if self.color is None and "color" in self.model_fields_set: + _dict['color'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if is_default (nullable) is None + # and model_fields_set contains the field + if self.is_default is None and "is_default" in self.model_fields_set: + _dict['is_default'] = None + + # set to None if read_only (nullable) is None + # and model_fields_set contains the field + if self.read_only is None and "read_only" in self.model_fields_set: + _dict['read_only'] = None + + # set to None if is_active (nullable) is None + # and model_fields_set contains the field + if self.is_active is None and "is_active" in self.model_fields_set: + _dict['is_active'] = None + + # set to None if is_internal (nullable) is None + # and model_fields_set contains the field + if self.is_internal is None and "is_internal" in self.model_fields_set: + _dict['is_internal'] = None + + # set to None if behaviour (nullable) is None + # and model_fields_set contains the field + if self.behaviour is None and "behaviour" in self.model_fields_set: + _dict['behaviour'] = None + return _dict @classmethod @@ -83,7 +136,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "title": obj.get("title") + "title": obj.get("title"), + "slug": obj.get("slug"), + "color": obj.get("color"), + "icon": obj.get("icon"), + "is_default": obj.get("is_default"), + "read_only": obj.get("read_only"), + "is_active": obj.get("is_active"), + "is_internal": obj.get("is_internal"), + "behaviour": obj.get("behaviour") }) return _obj