summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/api/schemas/latest/patchwork.yaml15
-rw-r--r--docs/api/schemas/patchwork.j215
-rw-r--r--docs/api/schemas/v1.0/patchwork.yaml14
-rw-r--r--docs/api/schemas/v1.1/patchwork.yaml14
-rw-r--r--docs/api/schemas/v1.2/patchwork.yaml15
-rw-r--r--patchwork/tests/api/test_event.py6
6 files changed, 28 insertions, 51 deletions
diff --git a/docs/api/schemas/latest/patchwork.yaml b/docs/api/schemas/latest/patchwork.yaml
index 28c1849..9fcafd0 100644
--- a/docs/api/schemas/latest/patchwork.yaml
+++ b/docs/api/schemas/latest/patchwork.yaml
@@ -379,7 +379,7 @@ paths:
schema:
type: array
items:
- oneOf:
+ anyOf:
- $ref: '#/components/schemas/EventCoverCreated'
- $ref: '#/components/schemas/EventPatchCreated'
- $ref: '#/components/schemas/EventPatchCompleted'
@@ -1636,6 +1636,7 @@ components:
title: Actor
description: The user that caused/created this event.
readOnly: true
+ nullable: true
allOf:
- $ref: '#/components/schemas/UserEmbedded'
payload:
@@ -1651,9 +1652,7 @@ components:
payload:
properties:
cover:
- title: Cover
- type: string
- readOnly: true
+ $ref: '#/components/schemas/CoverLetterEmbedded'
EventPatchCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
@@ -1729,13 +1728,9 @@ components:
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Previous delegate
+ $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Current delegate
+ $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2
index 13cc278..e587cd7 100644
--- a/docs/api/schemas/patchwork.j2
+++ b/docs/api/schemas/patchwork.j2
@@ -390,7 +390,7 @@ paths:
schema:
type: array
items:
- oneOf:
+ anyOf:
- $ref: '#/components/schemas/EventCoverCreated'
- $ref: '#/components/schemas/EventPatchCreated'
- $ref: '#/components/schemas/EventPatchCompleted'
@@ -1703,6 +1703,7 @@ components:
title: Actor
description: The user that caused/created this event.
readOnly: true
+ nullable: true
allOf:
- $ref: '#/components/schemas/UserEmbedded'
{% endif %}
@@ -1719,9 +1720,7 @@ components:
payload:
properties:
cover:
- title: Cover
- type: string
- readOnly: true
+ $ref: '#/components/schemas/CoverLetterEmbedded'
EventPatchCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
@@ -1799,13 +1798,9 @@ components:
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Previous delegate
+ $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Current delegate
+ $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
diff --git a/docs/api/schemas/v1.0/patchwork.yaml b/docs/api/schemas/v1.0/patchwork.yaml
index 92801ec..e946c9e 100644
--- a/docs/api/schemas/v1.0/patchwork.yaml
+++ b/docs/api/schemas/v1.0/patchwork.yaml
@@ -270,7 +270,7 @@ paths:
schema:
type: array
items:
- oneOf:
+ anyOf:
- $ref: '#/components/schemas/EventCoverCreated'
- $ref: '#/components/schemas/EventPatchCreated'
- $ref: '#/components/schemas/EventPatchCompleted'
@@ -1440,9 +1440,7 @@ components:
payload:
properties:
cover:
- title: Cover
- type: string
- readOnly: true
+ $ref: '#/components/schemas/CoverLetterEmbedded'
EventPatchCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
@@ -1500,13 +1498,9 @@ components:
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Previous delegate
+ $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Current delegate
+ $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
diff --git a/docs/api/schemas/v1.1/patchwork.yaml b/docs/api/schemas/v1.1/patchwork.yaml
index d57b535..614a7fb 100644
--- a/docs/api/schemas/v1.1/patchwork.yaml
+++ b/docs/api/schemas/v1.1/patchwork.yaml
@@ -270,7 +270,7 @@ paths:
schema:
type: array
items:
- oneOf:
+ anyOf:
- $ref: '#/components/schemas/EventCoverCreated'
- $ref: '#/components/schemas/EventPatchCreated'
- $ref: '#/components/schemas/EventPatchCompleted'
@@ -1465,9 +1465,7 @@ components:
payload:
properties:
cover:
- title: Cover
- type: string
- readOnly: true
+ $ref: '#/components/schemas/CoverLetterEmbedded'
EventPatchCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
@@ -1543,13 +1541,9 @@ components:
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Previous delegate
+ $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Current delegate
+ $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
diff --git a/docs/api/schemas/v1.2/patchwork.yaml b/docs/api/schemas/v1.2/patchwork.yaml
index f2ee2a8..9bab378 100644
--- a/docs/api/schemas/v1.2/patchwork.yaml
+++ b/docs/api/schemas/v1.2/patchwork.yaml
@@ -379,7 +379,7 @@ paths:
schema:
type: array
items:
- oneOf:
+ anyOf:
- $ref: '#/components/schemas/EventCoverCreated'
- $ref: '#/components/schemas/EventPatchCreated'
- $ref: '#/components/schemas/EventPatchCompleted'
@@ -1636,6 +1636,7 @@ components:
title: Actor
description: The user that caused/created this event.
readOnly: true
+ nullable: true
allOf:
- $ref: '#/components/schemas/UserEmbedded'
payload:
@@ -1651,9 +1652,7 @@ components:
payload:
properties:
cover:
- title: Cover
- type: string
- readOnly: true
+ $ref: '#/components/schemas/CoverLetterEmbedded'
EventPatchCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
@@ -1729,13 +1728,9 @@ components:
patch:
$ref: '#/components/schemas/PatchEmbedded'
previous_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Previous delegate
+ $ref: '#/components/schemas/UserEmbedded'
current_delegate:
- allOf:
- - $ref: '#/components/schemas/UserEmbedded'
- - title: Current delegate
+ $ref: '#/components/schemas/UserEmbedded'
EventCheckCreated:
allOf:
- $ref: '#/components/schemas/EventBase'
diff --git a/patchwork/tests/api/test_event.py b/patchwork/tests/api/test_event.py
index 54935d0..32e9936 100644
--- a/patchwork/tests/api/test_event.py
+++ b/patchwork/tests/api/test_event.py
@@ -115,7 +115,11 @@ class TestEventAPI(utils.APITestCase):
# There should only be one
self.assertEqual(1, len(resp.data))
- resp = self.client.get(self.api_url(), {'category': 'foo-bar'})
+ resp = self.client.get(
+ self.api_url(),
+ {'category': 'foo-bar'},
+ validate_request=False,
+ )
self.assertEqual(0, len(resp.data))
def test_list_filter_patch(self):