From patchwork Tue Oct 30 11:19:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 990740 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42kq0r3MZqz9s7W for ; Tue, 30 Oct 2018 22:26:20 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="AytH6ybu"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42kq0r1Dr6zF0yr for ; Tue, 30 Oct 2018 22:26:20 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="AytH6ybu"; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=that.guru (client-ip=185.234.75.17; helo=relay017.mxrelay.co; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="AytH6ybu"; dkim-atps=neutral Received: from relay017.mxrelay.co (relay017.mxrelay.co [185.234.75.17]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42kpsc2nZWzDsG1 for ; Tue, 30 Oct 2018 22:20:04 +1100 (AEDT) Received: from filter002.mxroute.com (unknown [185.133.192.179]) by relay017.mxrelay.co (Postfix) with ESMTP id A5BF242C61 for ; Tue, 30 Oct 2018 11:19:31 +0000 (UTC) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter002.mxroute.com (Postfix) with ESMTPS id 8B00B3F3DB for ; Tue, 30 Oct 2018 11:19:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VIgPHxSlPrssk1ojVGjG3ai15B6xTsaQR/TChEUYAo4=; b=AytH6ybuXw93Jhfb2W1Loj2By7 Bh644X3NVcSpm0jdIMManCN7ucvDnaIRZzgTUI8W82+gTzyQo1yDWANyKgMOzI8mLqSExVjg3+pFG UI+8BblI0obKUsWUBFl03NPI7yWjXBONFIVM8feMTq4viL63oa44o+5rYXNrPNqIXgihU6HIz/APi t3mTGQTrgfmI8xxcJbuody+5TpvgmcYWMnyV6y/doanPQAYkdMtPI88VMGXfs74pHR6+FMP3dttcN 224mbgL3nXNpa6skYOz0XEUzvxmrP4BEpyLtLN3n33415QhHrRT9YQ3Ev9sZQPCUSz4I60AMF12+a QR4AJM6Q==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 15/17] docs: Document the '/patches/{patchID}/checks' resource Date: Tue, 30 Oct 2018 11:19:14 +0000 Message-Id: <20181030111916.7342-16-stephen@that.guru> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181030111916.7342-1-stephen@that.guru> References: <20181030111916.7342-1-stephen@that.guru> X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: Stephen Finucane --- docs/api/schemas/patchwork.yaml | 235 ++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) diff --git a/docs/api/schemas/patchwork.yaml b/docs/api/schemas/patchwork.yaml index bb66c8a9..c2064985 100644 --- a/docs/api/schemas/patchwork.yaml +++ b/docs/api/schemas/patchwork.yaml @@ -411,6 +411,140 @@ paths: $ref: '#/components/schemas/Error' tags: - comments + /api/patches/{patch_id}/checks/: + get: + description: List checks. + operationId: checks_list + parameters: + - in: path + name: patch_id + required: true + schema: + description: '' + title: '' + type: string + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/BeforeFilter' + - $ref: '#/components/parameters/SinceFilter' + - in: query + name: user + schema: + description: '' + title: '' + type: string + - in: query + name: state + schema: + description: '' + title: '' + type: string + - in: query + name: context + schema: + description: '' + title: '' + type: string + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Check' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - checks + post: + description: Create a check. + operationId: checks_create + parameters: + - in: path + name: patch_id + required: true + schema: + description: '' + title: '' + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CheckUpdate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + '400': + description: 'Invalid Request' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorCheckCreate' + '403': + description: 'Forbidden' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - checks + /api/patches/{patch_id}/checks/{check_id}/: + get: + description: Show a check. + operationId: checks_read + parameters: + - in: path + name: patch_id + required: true + schema: + description: '' + title: '' + type: string + - in: path + name: check_id + required: true + schema: + description: '' + title: '' + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - checks /api/people/: get: description: List people. @@ -950,6 +1084,88 @@ components: type: string format: uri readOnly: true + Check: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: Url + type: string + format: uri + readOnly: true + user: + $ref: '#/components/schemas/UserEmbedded' + date: + title: Date + type: string + format: date-time + readOnly: true + state: + title: State + description: The state of the check. + type: string + enum: + - pending + - success + - warning + - fail + target_url: + title: Target URL + description: The target URL to associate with this check. This should be specific + to the patch. + type: string + format: uri + maxLength: 200 + x-nullable: true + context: + title: Context + description: A label to discern check from checks of other testing systems. + type: string + format: slug + pattern: ^[-a-zA-Z0-9_]+$ + maxLength: 255 + minLength: 1 + description: + title: Description + description: A brief description of the check. + type: string + x-nullable: true + CheckUpdate: + type: object + properties: + state: + title: State + description: The state of the check. + type: string + enum: + - pending + - success + - warning + - fail + target_url: + title: Target url + description: The target URL to associate with this check. This should be specific + to the patch. + type: string + format: uri + maxLength: 200 + x-nullable: true + context: + title: Context + description: A label to discern check from checks of other testing systems. + type: string + format: slug + pattern: ^[-a-zA-Z0-9_]+$ + maxLength: 255 + minLength: 1 + description: + title: Description + description: A brief description of the check. + type: string + x-nullable: true CommentList: type: object properties: @@ -1627,6 +1843,25 @@ components: title: Detail type: string readOnly: true + ErrorCheckCreate: + type: object + properties: + state: + title: State + type: string + readOnly: true + target_url: + title: Target URL + type: string + readOnly: true + context: + title: Context + type: string + readOnly: true + description: + title: Description + type: string + readOnly: true ErrorPatchUpdate: type: object properties: