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: 6 additions & 1 deletion testops-api/v1/paths/author.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ get:
description: |
This method allows to retrieve a specific author.
parameters:
- $ref: '../parameters/Id.yaml'
- name: id
in: path
description: Author UUID, or the deprecated integer author ID.
required: true
schema:
type: string
responses:
'200':
description: An author.
Expand Down
103 changes: 103 additions & 0 deletions testops-api/v1/paths/review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
get:
operationId: get-review
tags: [ reviews ]
summary: Get a specific review
description: |
This method allows to retrieve a specific review, including its current
approval status per reviewer.
parameters:
- $ref: '../parameters/Code.yaml'
- $ref: '../parameters/Id.yaml'
responses:
200:
description: A Review.
content:
application/json:
schema:
$ref: '../schemas/responses/ReviewResponse.yaml'
400:
description: Bad Request.
401:
description: Unauthorized.
402:
description: Payment Required.
403:
description: Forbidden.
404:
description: Not Found.
429:
description: Too Many Requests.

delete:
operationId: delete-review
tags: [ reviews ]
summary: Delete review
description: |
This method allows to delete a review. Merged reviews cannot be deleted.

Returns an error if test case review is disabled in the project settings.
parameters:
- $ref: '../parameters/Code.yaml'
- $ref: '../parameters/Id.yaml'
responses:
200:
description: A result.
content:
application/json:
schema:
$ref: '../schemas/responses/IdResponse.yaml'
400:
description: Bad Request.
401:
description: Unauthorized.
402:
description: Payment Required.
403:
description: Forbidden.
404:
description: Not Found.
422:
description: Unprocessable Entity.
429:
description: Too Many Requests.

patch:
operationId: update-review
tags: [ reviews ]
summary: Update review
description: |
This method allows to update the assigned reviewers and/or the proposed
test case payload of an open review. The reviewed test case cannot be changed.

Returns an error if test case review is disabled in the project settings,
or if the review is not open.
parameters:
- $ref: '../parameters/Code.yaml'
- $ref: '../parameters/Id.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../schemas/Review.update.yaml'
responses:
200:
description: A result.
content:
application/json:
schema:
$ref: '../schemas/responses/IdResponse.yaml'
400:
description: Bad Request.
401:
description: Unauthorized.
402:
description: Payment Required.
403:
description: Forbidden.
404:
description: Not Found.
422:
description: Unprocessable Entity.
429:
description: Too Many Requests.
39 changes: 39 additions & 0 deletions testops-api/v1/paths/review_bulk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
post:
operationId: bulk-create-reviews
tags: [ reviews ]
summary: Create reviews in bulk
description: |
This method allows to submit multiple test cases for review in one request.

Returns an error if test case review is disabled in the project settings.

parameters:
- $ref: '../parameters/Code.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../schemas/Review.bulk.yaml'

responses:
200:
description: Per-item outcomes for the submitted reviews.
content:
application/json:
schema:
$ref: '../schemas/responses/ReviewBulkResponse.yaml'
400:
description: Bad Request.
401:
description: Unauthorized.
402:
description: Payment Required.
403:
description: Forbidden.
404:
description: Not Found.
422:
description: Unprocessable Entity.
429:
description: Too Many Requests.
109 changes: 109 additions & 0 deletions testops-api/v1/paths/reviews.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
get:
operationId: get-reviews
tags: [ reviews ]
summary: Get all reviews
description: |
This method allows to retrieve all test case reviews stored in selected project.

parameters:
- $ref: '../parameters/Code.yaml'
- in: query
name: status
schema:
type: string
enum:
- open
- merged
- declined
- in: query
name: type
schema:
type: string
enum:
- create
- edit
- in: query
name: case_id
description: Filter reviews by the reviewed test case ID.
schema:
type: integer
format: int64
- in: query
name: author_uuid
description: Filter reviews by the author who created them (author UUID).
schema:
type: string
format: uuid
- in: query
name: reviewer_uuid
description: Filter reviews by an assigned reviewer (author UUID).
schema:
type: string
format: uuid
- in: query
name: search
description: Provide a string that will be used to search by review title.
schema:
type: string
- $ref: '../parameters/pagination/Limit.yaml'
- $ref: '../parameters/pagination/Offset.yaml'

responses:
200:
description: A list of all reviews.
content:
application/json:
schema:
$ref: '../schemas/responses/ReviewListResponse.yaml'
400:
description: Bad Request.
401:
description: Unauthorized.
402:
description: Payment Required.
403:
description: Forbidden.
404:
description: Not Found.
429:
description: Too Many Requests.

post:
operationId: create-review
tags: [ reviews ]
summary: Create a new review
description: |
This method allows to submit a test case for review in selected project.

Returns an error if test case review is disabled in the project settings.

parameters:
- $ref: '../parameters/Code.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../schemas/Review.create.yaml'

responses:
200:
description: A result.
content:
application/json:
schema:
$ref: '../schemas/responses/IdResponse.yaml'
400:
description: Bad Request.
401:
description: Unauthorized.
402:
description: Payment Required.
403:
description: Forbidden.
404:
description: Not Found.
422:
description: Unprocessable Entity.
429:
description: Too Many Requests.
6 changes: 6 additions & 0 deletions testops-api/v1/schemas/Author.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ properties:
id:
type: integer
format: int64
uuid:
type: string
format: uuid
description: Author UUID. Use it to reference the author in other API methods.
author_id:
type: integer
format: int64
deprecated: true
description: Deprecated, use `uuid` instead.
entity_type:
type: string
entity_id:
Expand Down
85 changes: 85 additions & 0 deletions testops-api/v1/schemas/Review.CaseData.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
type: object
description: The test case fields proposed by the review.
properties:
title:
type: string
maxLength: 255
description:
type: string
nullable: true
preconditions:
type: string
nullable: true
postconditions:
type: string
nullable: true
severity:
type: integer
nullable: true
priority:
type: integer
nullable: true
behavior:
type: integer
nullable: true
type:
type: integer
nullable: true
layer:
type: integer
nullable: true
is_flaky:
type: integer
nullable: true
is_muted:
type: boolean
description: Mute state of the proposed test case.
suite_id:
type: integer
format: int64
nullable: true
milestone_id:
type: integer
format: int64
nullable: true
is_manual:
type: boolean
description: '`true` if the case is manual, `false` if it is automated.'
is_to_be_automated:
type: boolean
description: '`true` if a manual case is planned to be automated.'
status:
type: integer
nullable: true
steps_type:
type: string
enum:
- classic
- gherkin
description: >-
Format of the steps field. Omit to keep the current one, `classic` for a
new-case draft; changing it requires sending `steps` in the same request.
attachments:
$ref: 'Attachment.hash_list.yaml'
steps:
type: array
description: For gherkin steps send the scenario in `value`.
items:
$ref: 'Review.StepData.yaml'
tags:
type: array
nullable: true
items:
type: string
parameters:
type: array
nullable: true
items:
$ref: 'TestCase.Parameter.Create.yaml'
custom_field:
allOf:
- $ref: 'CustomFieldValueMap.partial.yaml'
description: >-
Map of custom field ID to value. A `create` review must carry every
required custom field. An `edit` review is validated against the current
test case, so send only the fields the proposal changes.
Loading
Loading