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
1 change: 1 addition & 0 deletions qase-api-client/docs/TestCaseCreate.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**milestone_id** | **int** | | [optional]
**automation** | **int** | | [optional]
**status** | **int** | | [optional]
**steps_type** | **str** | Determines the format of the steps field. When \"classic\", steps use the standard action/expected_result/data format. When \"gherkin\", steps use the {value: \"Given...\\nWhen...\\nThen...\"} format. | [optional] [default to 'classic']
**attachments** | **List[str]** | A list of Attachment hashes. | [optional]
**steps** | [**List[TestStepCreate]**](TestStepCreate.md) | | [optional]
**tags** | **List[str]** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions qase-api-client/docs/TestCaseUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**milestone_id** | **int** | | [optional]
**automation** | **int** | | [optional]
**status** | **int** | | [optional]
**steps_type** | **str** | Determines the format of the steps field. When \"classic\", steps use the standard action/expected_result/data format. When \"gherkin\", steps use the {value: \"Given...\\nWhen...\\nThen...\"} format. | [optional] [default to 'classic']
**attachments** | **List[str]** | A list of Attachment hashes. | [optional]
**steps** | [**List[TestStepCreate]**](TestStepCreate.md) | | [optional]
**tags** | **List[str]** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions qase-api-client/docs/TestCasebulkCasesInner.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**milestone_id** | **int** | | [optional]
**automation** | **int** | | [optional]
**status** | **int** | | [optional]
**steps_type** | **str** | Determines the format of the steps field. When \"classic\", steps use the standard action/expected_result/data format. When \"gherkin\", steps use the {value: \"Given...\\nWhen...\\nThen...\"} format. | [optional] [default to 'classic']
**attachments** | **List[str]** | A list of Attachment hashes. | [optional]
**steps** | [**List[TestStepCreate]**](TestStepCreate.md) | | [optional]
**tags** | **List[str]** | | [optional]
Expand Down
3 changes: 2 additions & 1 deletion qase-api-client/docs/TestStepCreate.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**action** | **str** | | [optional]
**action** | **str** | Step action text. Used for classic steps. For gherkin steps, use the \"value\" property instead. | [optional]
**expected_result** | **str** | | [optional]
**data** | **str** | | [optional]
**value** | **str** | Gherkin scenario text. Used when steps_type is \"gherkin\". Example: \"Given a user exists\\nWhen they log in\\nThen they see the dashboard\" | [optional]
**position** | **int** | | [optional]
**attachments** | **List[str]** | A list of Attachment hashes. | [optional]
**steps** | **List[object]** | Nested steps may be passed here. Use same structure for them. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion qase-api-client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "qase-api-client"
version = "2.0.4"
version = "2.0.5"
description = "Qase TestOps API V1 client for Python"
readme = "README.md"
authors = [{name = "Qase Team", email = "support@qase.io"}]
Expand Down
12 changes: 11 additions & 1 deletion qase-api-client/src/qase/api_client_v1/models/qql_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import json

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from qase.api_client_v1.models.attachment import Attachment
from qase.api_client_v1.models.custom_field_value import CustomFieldValue
Expand Down Expand Up @@ -63,6 +63,16 @@ class QqlTestCase(BaseModel):
updated_by: Optional[StrictInt] = Field(default=None, description="Author ID of the last update.")
__properties: ClassVar[List[str]] = ["id", "test_case_id", "position", "title", "description", "preconditions", "postconditions", "severity", "priority", "type", "layer", "is_flaky", "behavior", "automation", "status", "milestone_id", "suite_id", "custom_fields", "attachments", "steps_type", "steps", "params", "tags", "member_id", "author_id", "created_at", "updated_at", "updated_by"]

@field_validator('steps_type')
def steps_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(['classic', 'gherkin']):
raise ValueError("must be one of enum values ('classic', 'gherkin')")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
12 changes: 11 additions & 1 deletion qase-api-client/src/qase/api_client_v1/models/test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import json

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from qase.api_client_v1.models.attachment import Attachment
from qase.api_client_v1.models.custom_field_value import CustomFieldValue
Expand Down Expand Up @@ -68,6 +68,16 @@ class TestCase(BaseModel):
external_issues: Optional[List[ExternalIssue]] = None
__properties: ClassVar[List[str]] = ["id", "position", "title", "description", "preconditions", "postconditions", "severity", "priority", "type", "layer", "is_flaky", "behavior", "automation", "status", "milestone_id", "suite_id", "custom_fields", "attachments", "steps_type", "steps", "params", "parameters", "tags", "member_id", "author_id", "created_at", "updated_at", "deleted", "created", "updated", "external_issues"]

@field_validator('steps_type')
def steps_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(['classic', 'gherkin']):
raise ValueError("must be one of enum values ('classic', 'gherkin')")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
16 changes: 14 additions & 2 deletions qase-api-client/src/qase/api_client_v1/models/test_case_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from qase.api_client_v1.models.test_case_parameter_create import TestCaseParameterCreate
Expand All @@ -44,6 +44,7 @@ class TestCaseCreate(BaseModel):
milestone_id: Optional[StrictInt] = None
automation: Optional[StrictInt] = None
status: Optional[StrictInt] = None
steps_type: Optional[StrictStr] = Field(default='classic', description="Determines the format of the steps field. When \"classic\", steps use the standard action/expected_result/data format. When \"gherkin\", steps use the {value: \"Given...\\nWhen...\\nThen...\"} format.")
attachments: Optional[List[StrictStr]] = Field(default=None, description="A list of Attachment hashes.")
steps: Optional[List[TestStepCreate]] = None
tags: Optional[List[StrictStr]] = None
Expand All @@ -52,7 +53,17 @@ class TestCaseCreate(BaseModel):
custom_field: Optional[Dict[str, StrictStr]] = Field(default=None, description="A map of custom fields values (id => value)")
created_at: Optional[StrictStr] = None
updated_at: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["description", "preconditions", "postconditions", "title", "severity", "priority", "behavior", "type", "layer", "is_flaky", "suite_id", "milestone_id", "automation", "status", "attachments", "steps", "tags", "params", "parameters", "custom_field", "created_at", "updated_at"]
__properties: ClassVar[List[str]] = ["description", "preconditions", "postconditions", "title", "severity", "priority", "behavior", "type", "layer", "is_flaky", "suite_id", "milestone_id", "automation", "status", "steps_type", "attachments", "steps", "tags", "params", "parameters", "custom_field", "created_at", "updated_at"]

@field_validator('steps_type')
def steps_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(['classic', 'gherkin']):
raise ValueError("must be one of enum values ('classic', 'gherkin')")
return value

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -143,6 +154,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"milestone_id": obj.get("milestone_id"),
"automation": obj.get("automation"),
"status": obj.get("status"),
"steps_type": obj.get("steps_type") if obj.get("steps_type") is not None else 'classic',
"attachments": obj.get("attachments"),
"steps": [TestStepCreate.from_dict(_item) for _item in obj["steps"]] if obj.get("steps") is not None else None,
"tags": obj.get("tags"),
Expand Down
12 changes: 11 additions & 1 deletion qase-api-client/src/qase/api_client_v1/models/test_case_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import json

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from qase.api_client_v1.models.attachment import Attachment
from qase.api_client_v1.models.custom_field_value import CustomFieldValue
Expand Down Expand Up @@ -63,6 +63,16 @@ class TestCaseQuery(BaseModel):
updated_by: Optional[StrictInt] = Field(default=None, description="Author ID of the last update.")
__properties: ClassVar[List[str]] = ["id", "test_case_id", "position", "title", "description", "preconditions", "postconditions", "severity", "priority", "type", "layer", "is_flaky", "behavior", "automation", "status", "milestone_id", "suite_id", "custom_fields", "attachments", "steps_type", "steps", "params", "tags", "member_id", "author_id", "created_at", "updated_at", "updated_by"]

@field_validator('steps_type')
def steps_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(['classic', 'gherkin']):
raise ValueError("must be one of enum values ('classic', 'gherkin')")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
16 changes: 14 additions & 2 deletions qase-api-client/src/qase/api_client_v1/models/test_case_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from qase.api_client_v1.models.test_case_parameter_create import TestCaseParameterCreate
Expand All @@ -44,13 +44,24 @@ class TestCaseUpdate(BaseModel):
milestone_id: Optional[StrictInt] = None
automation: Optional[StrictInt] = None
status: Optional[StrictInt] = None
steps_type: Optional[StrictStr] = Field(default='classic', description="Determines the format of the steps field. When \"classic\", steps use the standard action/expected_result/data format. When \"gherkin\", steps use the {value: \"Given...\\nWhen...\\nThen...\"} format.")
attachments: Optional[List[StrictStr]] = Field(default=None, description="A list of Attachment hashes.")
steps: Optional[List[TestStepCreate]] = None
tags: Optional[List[StrictStr]] = None
params: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Deprecated, use `parameters` instead.")
parameters: Optional[List[TestCaseParameterCreate]] = None
custom_field: Optional[Dict[str, StrictStr]] = Field(default=None, description="A map of custom fields values (id => value)")
__properties: ClassVar[List[str]] = ["description", "preconditions", "postconditions", "title", "severity", "priority", "behavior", "type", "layer", "is_flaky", "suite_id", "milestone_id", "automation", "status", "attachments", "steps", "tags", "params", "parameters", "custom_field"]
__properties: ClassVar[List[str]] = ["description", "preconditions", "postconditions", "title", "severity", "priority", "behavior", "type", "layer", "is_flaky", "suite_id", "milestone_id", "automation", "status", "steps_type", "attachments", "steps", "tags", "params", "parameters", "custom_field"]

@field_validator('steps_type')
def steps_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(['classic', 'gherkin']):
raise ValueError("must be one of enum values ('classic', 'gherkin')")
return value

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -141,6 +152,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"milestone_id": obj.get("milestone_id"),
"automation": obj.get("automation"),
"status": obj.get("status"),
"steps_type": obj.get("steps_type") if obj.get("steps_type") is not None else 'classic',
"attachments": obj.get("attachments"),
"steps": [TestStepCreate.from_dict(_item) for _item in obj["steps"]] if obj.get("steps") is not None else None,
"tags": obj.get("tags"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from qase.api_client_v1.models.test_case_parameter_create import TestCaseParameterCreate
Expand All @@ -44,6 +44,7 @@ class TestCasebulkCasesInner(BaseModel):
milestone_id: Optional[StrictInt] = None
automation: Optional[StrictInt] = None
status: Optional[StrictInt] = None
steps_type: Optional[StrictStr] = Field(default='classic', description="Determines the format of the steps field. When \"classic\", steps use the standard action/expected_result/data format. When \"gherkin\", steps use the {value: \"Given...\\nWhen...\\nThen...\"} format.")
attachments: Optional[List[StrictStr]] = Field(default=None, description="A list of Attachment hashes.")
steps: Optional[List[TestStepCreate]] = None
tags: Optional[List[StrictStr]] = None
Expand All @@ -53,7 +54,17 @@ class TestCasebulkCasesInner(BaseModel):
created_at: Optional[StrictStr] = None
updated_at: Optional[StrictStr] = None
id: Optional[StrictInt] = None
__properties: ClassVar[List[str]] = ["description", "preconditions", "postconditions", "title", "severity", "priority", "behavior", "type", "layer", "is_flaky", "suite_id", "milestone_id", "automation", "status", "attachments", "steps", "tags", "params", "parameters", "custom_field", "created_at", "updated_at", "id"]
__properties: ClassVar[List[str]] = ["description", "preconditions", "postconditions", "title", "severity", "priority", "behavior", "type", "layer", "is_flaky", "suite_id", "milestone_id", "automation", "status", "steps_type", "attachments", "steps", "tags", "params", "parameters", "custom_field", "created_at", "updated_at", "id"]

@field_validator('steps_type')
def steps_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(['classic', 'gherkin']):
raise ValueError("must be one of enum values ('classic', 'gherkin')")
return value

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -149,6 +160,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"milestone_id": obj.get("milestone_id"),
"automation": obj.get("automation"),
"status": obj.get("status"),
"steps_type": obj.get("steps_type") if obj.get("steps_type") is not None else 'classic',
"attachments": obj.get("attachments"),
"steps": [TestStepCreate.from_dict(_item) for _item in obj["steps"]] if obj.get("steps") is not None else None,
"tags": obj.get("tags"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ class TestStepCreate(BaseModel):
"""
TestStepCreate
""" # noqa: E501
action: Optional[StrictStr] = None
action: Optional[StrictStr] = Field(default=None, description="Step action text. Used for classic steps. For gherkin steps, use the \"value\" property instead.")
expected_result: Optional[StrictStr] = None
data: Optional[StrictStr] = None
value: Optional[StrictStr] = Field(default=None, description="Gherkin scenario text. Used when steps_type is \"gherkin\". Example: \"Given a user exists\\nWhen they log in\\nThen they see the dashboard\"")
position: Optional[StrictInt] = None
attachments: Optional[List[StrictStr]] = Field(default=None, description="A list of Attachment hashes.")
steps: Optional[List[Dict[str, Any]]] = Field(default=None, description="Nested steps may be passed here. Use same structure for them.")
__properties: ClassVar[List[str]] = ["action", "expected_result", "data", "position", "attachments", "steps"]
__properties: ClassVar[List[str]] = ["action", "expected_result", "data", "value", "position", "attachments", "steps"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -89,6 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"action": obj.get("action"),
"expected_result": obj.get("expected_result"),
"data": obj.get("data"),
"value": obj.get("value"),
"position": obj.get("position"),
"attachments": obj.get("attachments"),
"steps": obj.get("steps")
Expand Down
Loading