From patchwork Tue Oct 30 11:19:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 990750 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 42kq4R06R8z9s89 for ; Tue, 30 Oct 2018 22:29:27 +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="rfFFeWuh"; 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 42kq4Q56Y0zDrNx for ; Tue, 30 Oct 2018 22:29:26 +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="rfFFeWuh"; 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.11; helo=relay004.mxroute.com; 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="rfFFeWuh"; dkim-atps=neutral Received: from relay004.mxroute.com (relay004.mxroute.com [185.234.75.11]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42kptG6RzNzF0yr for ; Tue, 30 Oct 2018 22:20:38 +1100 (AEDT) Received: from relay-ext1.mxrelay.co (relay-ext1.mxrelay.co [185.19.31.132]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay004.mxroute.com (Postfix) with ESMTPS id D7B8D3F38C for ; Tue, 30 Oct 2018 11:20:05 +0000 (UTC) Received: from filter001.mxrelay.co (filter001.mxrelay.co [64.52.23.203]) by relay-ext1.mxrelay.co (Postfix) with ESMTP id DFA203FC30 for ; Tue, 30 Oct 2018 11:19:30 +0000 (UTC) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter001.mxrelay.co (Postfix) with ESMTPS id 8DFD210007F for ; Tue, 30 Oct 2018 11:19:30 +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=6QoH26RoBfzy//HLrTLiziechvif96JwXZ0cWYybLVA=; b=rfFFeWuhtsPuNX30JlRQHX6700 SK0S8fw4ExjV7SfTK1jDrytobFpdLenC/ebtKT2+LAPr3EUhdqycNKeE3V6LEdXwhQsY8pyjqUhJC 3sE6vBDil8KbHmaf1Pnr/bra34DPxQ+p5caCAa4zkd/MIHf9k3r29+PQD4RQIDI+JkZ4eROa51X4v 2Be5TCIKwT27TwLfwFoAHP0RjnEwG16dJQJcnuqQY5xSVXmi64cMnH0IbC1eR1b4PGTXn/MQZKsph 2VH2BdqiKOgPXX7598vEJhmjUFVfLqAhqwwfyYflKZTTk//cyksUZBGabKRa7i7ihqS1kZjwPvQ9n jr5D8liw==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 11/17] docs: Document the '/patches' resource Date: Tue, 30 Oct 2018 11:19:10 +0000 Message-Id: <20181030111916.7342-12-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" The big one (TM). Nothing too odd here though. Signed-off-by: Stephen Finucane --- docs/api/schemas/patchwork.yaml | 351 ++++++++++++++++++++++++++++++++ 1 file changed, 351 insertions(+) diff --git a/docs/api/schemas/patchwork.yaml b/docs/api/schemas/patchwork.yaml index 3cadd35a..0763bd50 100644 --- a/docs/api/schemas/patchwork.yaml +++ b/docs/api/schemas/patchwork.yaml @@ -163,6 +163,186 @@ paths: $ref: '#/components/schemas/Error' tags: - covers + /api/patches/: + get: + description: List patches. + operationId: patches_list + parameters: + - $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: project + schema: + description: '' + title: '' + type: string + - in: query + name: series + schema: + description: '' + title: '' + type: string + - in: query + name: submitter + schema: + description: '' + title: '' + type: string + - in: query + name: delegate + schema: + description: '' + title: '' + type: string + - in: query + name: state + schema: + description: '' + title: '' + type: string + - in: query + name: archived + schema: + description: '' + title: '' + type: string + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + $ref: '#/components/schemas/PatchList' + tags: + - patches + /api/patches/{id}/: + get: + description: Show a patch. + operationId: patches_read + parameters: + - in: path + name: id + required: true + schema: + description: '' + title: '' + type: string + tags: + - patches + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PatchDetail' + '403': + description: 'Forbidden' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + patch: + description: Update a patch (partial). + operationId: patches_partial_update + parameters: + - in: path + name: id + required: true + schema: + description: '' + title: '' + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PatchUpdate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PatchDetail' + '400': + description: 'Invalid Request' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorPatchUpdate' + '403': + description: 'Forbidden' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - patches + put: + description: Update a patch. + operationId: patches_update + parameters: + - in: path + name: id + required: true + schema: + description: '' + title: '' + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PatchUpdate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PatchDetail' + '400': + description: 'Invalid Request' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorPatchUpdate' + '403': + description: 'Forbidden' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - patches /api/people/: get: description: List people. @@ -701,6 +881,158 @@ components: type: string readOnly: true minLength: 1 + PatchList: + required: + - state + - delegate + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: Url + type: string + format: uri + readOnly: true + web_url: + title: Web url + type: string + format: uri + readOnly: true + project: + $ref: '#/components/schemas/ProjectEmbedded' + msgid: + title: Msgid + type: string + readOnly: true + minLength: 1 + date: + title: Date + type: string + format: date-time + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + commit_ref: + title: Commit ref + type: string + maxLength: 255 + x-nullable: true + pull_url: + title: Pull URL + type: string + format: uri + maxLength: 255 + x-nullable: true + state: + title: State + type: string + archived: + title: Archived + type: boolean + hash: + title: Hash + type: string + readOnly: true + minLength: 1 + submitter: + allOf: + - $ref: '#/components/schemas/User' + - title: Submitter + - readOnly: true + delegate: + allOf: + - $ref: '#/components/schemas/User' + - title: Delegate + mbox: + title: Mbox + type: string + format: uri + readOnly: true + series: + $ref: '#/components/schemas/SeriesEmbedded' + comments: + title: Comments + type: string + format: uri + readOnly: true + check: + title: Check + type: string + readOnly: true + enum: + - pending + - success + - warning + - fail + checks: + title: Checks + type: string + format: uri + readOnly: true + tags: + title: Tags + type: array + items: + type: string + readOnly: true + PatchDetail: + allOf: + - $ref: '#/components/schemas/PatchList' + - properties: + headers: + title: Headers + type: array + items: + type: string + readOnly: true + content: + title: Content + type: string + readOnly: true + minLength: 1 + diff: + title: Diff + type: string + readOnly: true + minLength: 1 + prefixes: + title: Prefixes + type: array + items: + type: string + readOnly: true + PatchUpdate: + required: + - state + - delegate + type: object + properties: + commit_ref: + title: Commit ref + type: string + maxLength: 255 + x-nullable: true + pull_url: + title: Pull URL + type: string + format: uri + maxLength: 255 + x-nullable: true + state: + title: State + type: string + archived: + title: Archived + type: boolean + delegate: + title: Delegate + type: integer Person: type: object properties: @@ -1020,6 +1352,25 @@ components: title: Detail type: string readOnly: true + ErrorPatchUpdate: + type: object + properties: + state: + title: State + type: string + readOnly: true + delegate: + title: Delegate + type: string + readOnly: true + commit_ref: + title: Commit ref + type: string + readOnly: true + archived: + title: Archived + type: string + readOnly: true ErrorProjectUpdate: type: object properties: