From patchwork Tue Oct 30 11:19:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 990747 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42kq3X5qj1z9s7W for ; Tue, 30 Oct 2018 22:28:40 +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="TQIVX/0a"; 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 42kq3X4L49zF1QC for ; Tue, 30 Oct 2018 22:28:40 +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="TQIVX/0a"; 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="TQIVX/0a"; 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 42kptD4rm1zDrSM for ; Tue, 30 Oct 2018 22:20:36 +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 8FF5B3F382 for ; Tue, 30 Oct 2018 11:20:03 +0000 (UTC) Received: from filter002.mxroute.com (unknown [185.133.192.179]) by relay-ext1.mxrelay.co (Postfix) with ESMTP id 4B0A23FC2D for ; Tue, 30 Oct 2018 11:19:28 +0000 (UTC) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter002.mxroute.com (Postfix) with ESMTPS id B28B73F3DB for ; Tue, 30 Oct 2018 11:19:28 +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=MfA/zE5TJFoCMmbiBOuhrFpqWfUTfmEIAOOoRTigYu8=; b=TQIVX/0a4Hr5vHCRvZ1Pz02U8P Hn2N/LNfxCaAv3KqjjWfbgKV63JGyUyA5Eu6kAGM8/R27CFAZLXSeH54o6qVCxwBMZXvG0afu1IuV 5wmR3/rVbxgcrk1Xe71uCKqbBuyzfbYKulMPs6/sW63oz/NMUfnKDg/zqy+RdqFdxYPirq+sWWUk7 0kqkqS7KXjrWcpn33KbzutxGOHWi3mHY03QGP4GOfihtWOGz5lHsTuFAzsgmla98kxWVWgcL9Nhrx lAXdZ7qhhEvom7+5ZTHZK/zDk4ZdiU+kIeoHEmAm4dSp0GZdcridHdCfZ9+Zdt8x6mVKLSZ1SoUA8 BRTuA7fQ==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 09/17] docs: Document the '/bundles' resource Date: Tue, 30 Oct 2018 11:19:08 +0000 Message-Id: <20181030111916.7342-10-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" This one's a little unusual too, in that we provide the embedded serializer for resources we haven't defined the end resource for. That's necessary in general, due to recursive references in the API (series-patch, patch-series etc.) so might as well embrace it early. Signed-off-by: Stephen Finucane --- docs/api/schemas/patchwork.yaml | 203 ++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) diff --git a/docs/api/schemas/patchwork.yaml b/docs/api/schemas/patchwork.yaml index 99a15ad4..c5c29b50 100644 --- a/docs/api/schemas/patchwork.yaml +++ b/docs/api/schemas/patchwork.yaml @@ -25,6 +25,74 @@ paths: $ref: '#/components/schemas/Index' tags: - api + /api/bundles/: + get: + description: List bundles. + operationId: bundles_list + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + - in: query + name: project + schema: + description: '' + title: '' + type: string + - in: query + name: owner + schema: + description: '' + title: '' + type: string + - in: query + name: public + schema: + description: '' + title: '' + type: string + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Bundle' + tags: + - bundles + /api/bundles/{id}/: + get: + description: Show a bundle. + operationId: bundles_read + parameters: + - in: path + name: id + required: true + schema: + description: '' + title: '' + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Bundle' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - bundles /api/people/: get: description: List people. @@ -442,6 +510,50 @@ components: type: string format: uri readOnly: true + Bundle: + required: + - name + 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' + name: + title: Name + type: string + maxLength: 50 + minLength: 1 + owner: + allOf: + - $ref: '#/components/schemas/UserEmbedded' + - title: Owner + patches: + type: array + items: + $ref: '#/components/schemas/PatchEmbedded' + readOnly: true + uniqueItems: true + public: + title: Public + type: boolean + mbox: + title: Mbox + type: string + format: uri + readOnly: true Person: type: object properties: @@ -566,6 +678,97 @@ components: format: email readOnly: true minLength: 1 + PatchEmbedded: + 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 + 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 + mbox: + title: Mbox + type: string + format: uri + readOnly: true + ProjectEmbedded: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: Url + type: string + format: uri + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + link_name: + title: Link name + type: string + readOnly: true + maxLength: 255 + minLength: 1 + list_id: + title: List id + type: string + readOnly: true + maxLength: 255 + minLength: 1 + list_email: + title: List email + type: string + format: email + readOnly: true + maxLength: 200 + minLength: 1 + web_url: + title: Web url + type: string + format: uri + readOnly: true + maxLength: 2000 + scm_url: + title: Scm url + type: string + format: uri + readOnly: true + maxLength: 2000 + webscm_url: + title: Webscm url + type: string + format: uri + readOnly: true + maxLength: 2000 UserEmbedded: type: object properties: