Skip to content

Commit

Permalink
Merge pull request #164 from qase-tms/PP-1371
Browse files Browse the repository at this point in the history
PP-1371 Updated the QQL response schema
  • Loading branch information
dkolpakovqase authored Feb 11, 2025
2 parents b4aad48 + dce3a1f commit fb9b8fc
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 4 deletions.
3 changes: 3 additions & 0 deletions testops-api/v1/schemas/Requirement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ properties:
id:
type: integer
format: int64
requirement_id:
type: integer
format: int64
parent_id:
type: integer
format: int64
Expand Down
2 changes: 2 additions & 0 deletions testops-api/v1/schemas/Result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ type: object
properties:
hash:
type: string
result_hash:
type: string
comment:
type: string
nullable: true
Expand Down
3 changes: 3 additions & 0 deletions testops-api/v1/schemas/Run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ properties:
id:
type: integer
format: int64
run_id:
type: integer
format: int64
title:
type: string
description:
Expand Down
7 changes: 6 additions & 1 deletion testops-api/v1/schemas/qql/DefectQuery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ properties:
id:
type: integer
format: int64
defect_id:
type: integer
format: int64
title:
type: string
actual_result:
Expand Down Expand Up @@ -48,4 +51,6 @@ properties:
updated_at:
type: string
format: date-time
example: "2021-12-30T19:23:59+00:00"
example: "2021-12-30T19:23:59+00:00"
required:
- defect_id
5 changes: 5 additions & 0 deletions testops-api/v1/schemas/qql/PlanQuery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ properties:
id:
type: integer
format: int64
plan_id:
type: integer
format: int64
title:
type: string
description:
Expand All @@ -18,3 +21,5 @@ properties:
type: string
format: date-time
example: "2021-12-30T19:23:59+00:00"
required:
- plan_id
48 changes: 48 additions & 0 deletions testops-api/v1/schemas/qql/RequirementQuery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: object
properties:
id:
type: integer
format: int64
requirement_id:
type: integer
format: int64
parent_id:
type: integer
format: int64
nullable: true
member_id:
type: integer
format: int64
title:
type: string
description:
type: string
nullable: true
status:
type: string
enum:
- valid
- draft
- review
- rework
- finish
- implemented
- not-testable
- obsolete
type:
type: string
enum:
- epic
- user-story
- feature
created_at:
type: string
format: date-time
example: "2021-12-30T19:23:59+00:00"
updated_at:
type: string
format: date-time
example: "2021-12-30T19:23:59+00:00"
nullable: true
required:
- requirement_id
41 changes: 41 additions & 0 deletions testops-api/v1/schemas/qql/ResultQuery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
type: object
properties:
hash:
type: string
result_hash:
type: string
comment:
type: string
nullable: true
stacktrace:
type: string
nullable: true
run_id:
type: integer
format: int64
case_id:
type: integer
format: int64
steps:
type: array
nullable: true
items:
$ref: '../TestStepResult.yaml'
status:
type: string
is_api_result:
type: boolean
time_spent_ms:
type: integer
format: int64
end_time:
type: string
format: date-time
example: "2021-12-30T19:23:59+00:00"
nullable: true
attachments:
type: array
items:
$ref: '../Attachment.yaml'
required:
- result_hash
105 changes: 105 additions & 0 deletions testops-api/v1/schemas/qql/RunQuery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
type: object
properties:
id:
type: integer
format: int64
run_id:
type: integer
format: int64
title:
type: string
description:
type: string
nullable: true
status:
type: integer
status_text:
type: string
start_time:
type: string
format: date-time
example: "2021-12-30T19:23:59+00:00"
nullable: true
end_time:
type: string
format: date-time
example: "2021-12-30T19:23:59+00:00"
nullable: true
public:
type: boolean
stats:
type: object
properties:
total:
type: integer
statuses:
type: object
additionalProperties:
type: integer
untested:
type: integer
deprecated: true
passed:
type: integer
deprecated: true
failed:
type: integer
deprecated: true
blocked:
type: integer
deprecated: true
skipped:
type: integer
deprecated: true
retest:
type: integer
deprecated: true
in_progress:
type: integer
deprecated: true
invalid:
type: integer
deprecated: true
time_spent:
type: integer
format: int64
description: Time in ms.
environment:
type: object
properties:
title:
type: string
description:
type: string
slug:
type: string
host:
type: string
nullable: true
milestone:
type: object
properties:
title:
type: string
description:
type: string
nullable: true
custom_fields:
type: array
items:
$ref: './../CustomFieldValue.yaml'
tags:
type: array
items:
$ref: './../Tag.value.yaml'
cases:
type: array
items:
type: integer
format: int64
plan_id:
type: integer
format: int64
nullable: true
required:
- run_id
5 changes: 5 additions & 0 deletions testops-api/v1/schemas/qql/TestCaseQuery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ properties:
id:
type: integer
format: int64
test_case_id:
type: integer
format: int64
position:
type: integer
title:
Expand Down Expand Up @@ -80,3 +83,5 @@ properties:
type: string
format: date-time
example: "2021-12-30T19:23:59+00:00"
required:
- test_case_id
6 changes: 3 additions & 3 deletions testops-api/v1/schemas/responses/SearchResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ allOf:
type: array
items:
oneOf:
- $ref: '../Run.yaml'
- $ref: '../Result.yaml'
- $ref: '../Requirement.yaml'
- $ref: '../qql/RunQuery.yaml'
- $ref: '../qql/ResultQuery.yaml'
- $ref: '../qql/RequirementQuery.yaml'
- $ref: '../qql/TestCaseQuery.yaml'
- $ref: '../qql/DefectQuery.yaml'
- $ref: '../qql/PlanQuery.yaml'
Expand Down

0 comments on commit fb9b8fc

Please sign in to comment.