]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Don't version events
authorStephen Finucane <stephen@that.guru>
Tue, 29 Mar 2022 18:57:31 +0000 (19:57 +0100)
committerStephen Finucane <stephen@that.guru>
Fri, 6 May 2022 17:51:02 +0000 (18:51 +0100)
We don't actually version the types of events we emit. Doing so would be
possible, but this ship has already sailed (with API version 1.2).

We also remove some unnecessary line breaks.

Signed-off-by: Stephen Finucane <stephen@that.guru>
docs/api/schemas/latest/patchwork.yaml
docs/api/schemas/patchwork.j2
docs/api/schemas/v1.0/patchwork.yaml
docs/api/schemas/v1.1/patchwork.yaml
docs/api/schemas/v1.2/patchwork.yaml
docs/api/schemas/v1.3/patchwork.yaml

index 2a98c179e89e2ff5ae5da738fa1e7afb6aacae0a..43edfb043630bceed82e868c662ef82943e114ce 100644 (file)
@@ -402,7 +402,11 @@ paths:
             type: string
         - in: query
           name: category
-          description: An event category to filter events by.
+          description: >
+            An event category to filter events by. These categories are subject
+            to change depending on the version of Patchwork deployed and are
+            not subject to the versionining constraints present across the rest
+            of the API.
           schema:
             title: ''
             type: string
@@ -460,18 +464,13 @@ paths:
                     mapping:
                       cover-created: '#/components/schemas/EventCoverCreated'
                       patch-created: '#/components/schemas/EventPatchCreated'
-                      patch-completed: >
-                        '#/components/schemas/EventPatchCompleted'
-                      patch-state-changed: >
-                        '#/components/schemas/EventPatchStateChanged'
-                      patch-relation-changed: >
-                        '#/components/schemas/EventPatchRelationChanged'
-                      patch-delegated: >
-                        '#/components/schemas/EventPatchDelegated'
+                      patch-completed: '#/components/schemas/EventPatchCompleted'
+                      patch-state-changed: '#/components/schemas/EventPatchStateChanged'
+                      patch-relation-changed: '#/components/schemas/EventPatchRelationChanged'
+                      patch-delegated: '#/components/schemas/EventPatchDelegated'
                       check-created: '#/components/schemas/EventCheckCreated'
                       series-created: '#/components/schemas/EventSeriesCreated'
-                      series-completed: >
-                        '#/components/schemas/EventSeriesCompleted'
+                      series-completed: '#/components/schemas/EventSeriesCompleted'
       tags:
         - events
   /api/patches/:
index 02aa9f72ca80e71b6ce94d45f848a0bb9a71597f..df72c1acefede8f4cdf359cead9a5a89603df881 100644 (file)
@@ -413,7 +413,11 @@ paths:
             type: string
         - in: query
           name: category
-          description: An event category to filter events by.
+          description: >
+            An event category to filter events by. These categories are subject
+            to change depending on the version of Patchwork deployed and are
+            not subject to the versionining constraints present across the rest
+            of the API.
           schema:
             title: ''
             type: string
@@ -422,9 +426,7 @@ paths:
               - patch-created
               - patch-completed
               - patch-state-changed
-{% if version >= (1, 2) %}
               - patch-relation-changed
-{% endif %}
               - patch-delegated
               - check-created
               - series-created
@@ -463,9 +465,7 @@ paths:
                     - $ref: '#/components/schemas/EventPatchCreated'
                     - $ref: '#/components/schemas/EventPatchCompleted'
                     - $ref: '#/components/schemas/EventPatchStateChanged'
-{% if version >= (1, 2) %}
                     - $ref: '#/components/schemas/EventPatchRelationChanged'
-{% endif %}
                     - $ref: '#/components/schemas/EventPatchDelegated'
                     - $ref: '#/components/schemas/EventCheckCreated'
                     - $ref: '#/components/schemas/EventSeriesCreated'
@@ -475,20 +475,13 @@ paths:
                     mapping:
                       cover-created: '#/components/schemas/EventCoverCreated'
                       patch-created: '#/components/schemas/EventPatchCreated'
-                      patch-completed: >
-                        '#/components/schemas/EventPatchCompleted'
-                      patch-state-changed: >
-                        '#/components/schemas/EventPatchStateChanged'
-{% if version >= (1, 2) %}
-                      patch-relation-changed: >
-                        '#/components/schemas/EventPatchRelationChanged'
-{% endif %}
-                      patch-delegated: >
-                        '#/components/schemas/EventPatchDelegated'
+                      patch-completed: '#/components/schemas/EventPatchCompleted'
+                      patch-state-changed: '#/components/schemas/EventPatchStateChanged'
+                      patch-relation-changed: '#/components/schemas/EventPatchRelationChanged'
+                      patch-delegated: '#/components/schemas/EventPatchDelegated'
                       check-created: '#/components/schemas/EventCheckCreated'
                       series-created: '#/components/schemas/EventSeriesCreated'
-                      series-completed: >
-                        '#/components/schemas/EventSeriesCompleted'
+                      series-completed: '#/components/schemas/EventSeriesCompleted'
       tags:
         - events
   /api/{{ version_url }}patches/:
@@ -1922,7 +1915,6 @@ components:
                 current_state:
                   title: Current state
                   type: string
-{% if version >= (1, 2) %}
     EventPatchRelationChanged:
       allOf:
         - $ref: '#/components/schemas/EventBase'
@@ -1943,7 +1935,6 @@ components:
                   title: Current relation
                   type: string
                   nullable: true
-{% endif %}
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
index 23e8930a3f6c86a6f99bb8a9a67910cf0628f278..e2f1362fec8d89a7fae79b72ba4c47d7ad944b2d 100644 (file)
@@ -228,7 +228,11 @@ paths:
             type: string
         - in: query
           name: category
-          description: An event category to filter events by.
+          description: >
+            An event category to filter events by. These categories are subject
+            to change depending on the version of Patchwork deployed and are
+            not subject to the versionining constraints present across the rest
+            of the API.
           schema:
             title: ''
             type: string
@@ -237,6 +241,7 @@ paths:
               - patch-created
               - patch-completed
               - patch-state-changed
+              - patch-relation-changed
               - patch-delegated
               - check-created
               - series-created
@@ -275,6 +280,7 @@ paths:
                     - $ref: '#/components/schemas/EventPatchCreated'
                     - $ref: '#/components/schemas/EventPatchCompleted'
                     - $ref: '#/components/schemas/EventPatchStateChanged'
+                    - $ref: '#/components/schemas/EventPatchRelationChanged'
                     - $ref: '#/components/schemas/EventPatchDelegated'
                     - $ref: '#/components/schemas/EventCheckCreated'
                     - $ref: '#/components/schemas/EventSeriesCreated'
@@ -284,16 +290,13 @@ paths:
                     mapping:
                       cover-created: '#/components/schemas/EventCoverCreated'
                       patch-created: '#/components/schemas/EventPatchCreated'
-                      patch-completed: >
-                        '#/components/schemas/EventPatchCompleted'
-                      patch-state-changed: >
-                        '#/components/schemas/EventPatchStateChanged'
-                      patch-delegated: >
-                        '#/components/schemas/EventPatchDelegated'
+                      patch-completed: '#/components/schemas/EventPatchCompleted'
+                      patch-state-changed: '#/components/schemas/EventPatchStateChanged'
+                      patch-relation-changed: '#/components/schemas/EventPatchRelationChanged'
+                      patch-delegated: '#/components/schemas/EventPatchDelegated'
                       check-created: '#/components/schemas/EventCheckCreated'
                       series-created: '#/components/schemas/EventSeriesCreated'
-                      series-completed: >
-                        '#/components/schemas/EventSeriesCompleted'
+                      series-completed: '#/components/schemas/EventSeriesCompleted'
       tags:
         - events
   /api/1.0/patches/:
@@ -1485,6 +1488,26 @@ components:
                 current_state:
                   title: Current state
                   type: string
+    EventPatchRelationChanged:
+      allOf:
+        - $ref: '#/components/schemas/EventBase'
+        - type: object
+          properties:
+            category:
+              enum:
+                - patch-relation-changed
+            payload:
+              properties:
+                patch:
+                  $ref: '#/components/schemas/PatchEmbedded'
+                previous_relation:
+                  title: Previous relation
+                  type: string
+                  nullable: true
+                current_relation:
+                  title: Current relation
+                  type: string
+                  nullable: true
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
index 3b75c548ff9ed5d4d5d79bf385a6bbe8ae974e6e..cdf8ef296044faf0f14369db451c6f815db16d8b 100644 (file)
@@ -228,7 +228,11 @@ paths:
             type: string
         - in: query
           name: category
-          description: An event category to filter events by.
+          description: >
+            An event category to filter events by. These categories are subject
+            to change depending on the version of Patchwork deployed and are
+            not subject to the versionining constraints present across the rest
+            of the API.
           schema:
             title: ''
             type: string
@@ -237,6 +241,7 @@ paths:
               - patch-created
               - patch-completed
               - patch-state-changed
+              - patch-relation-changed
               - patch-delegated
               - check-created
               - series-created
@@ -275,6 +280,7 @@ paths:
                     - $ref: '#/components/schemas/EventPatchCreated'
                     - $ref: '#/components/schemas/EventPatchCompleted'
                     - $ref: '#/components/schemas/EventPatchStateChanged'
+                    - $ref: '#/components/schemas/EventPatchRelationChanged'
                     - $ref: '#/components/schemas/EventPatchDelegated'
                     - $ref: '#/components/schemas/EventCheckCreated'
                     - $ref: '#/components/schemas/EventSeriesCreated'
@@ -284,16 +290,13 @@ paths:
                     mapping:
                       cover-created: '#/components/schemas/EventCoverCreated'
                       patch-created: '#/components/schemas/EventPatchCreated'
-                      patch-completed: >
-                        '#/components/schemas/EventPatchCompleted'
-                      patch-state-changed: >
-                        '#/components/schemas/EventPatchStateChanged'
-                      patch-delegated: >
-                        '#/components/schemas/EventPatchDelegated'
+                      patch-completed: '#/components/schemas/EventPatchCompleted'
+                      patch-state-changed: '#/components/schemas/EventPatchStateChanged'
+                      patch-relation-changed: '#/components/schemas/EventPatchRelationChanged'
+                      patch-delegated: '#/components/schemas/EventPatchDelegated'
                       check-created: '#/components/schemas/EventCheckCreated'
                       series-created: '#/components/schemas/EventSeriesCreated'
-                      series-completed: >
-                        '#/components/schemas/EventSeriesCompleted'
+                      series-completed: '#/components/schemas/EventSeriesCompleted'
       tags:
         - events
   /api/1.1/patches/:
@@ -1510,6 +1513,26 @@ components:
                 current_state:
                   title: Current state
                   type: string
+    EventPatchRelationChanged:
+      allOf:
+        - $ref: '#/components/schemas/EventBase'
+        - type: object
+          properties:
+            category:
+              enum:
+                - patch-relation-changed
+            payload:
+              properties:
+                patch:
+                  $ref: '#/components/schemas/PatchEmbedded'
+                previous_relation:
+                  title: Previous relation
+                  type: string
+                  nullable: true
+                current_relation:
+                  title: Current relation
+                  type: string
+                  nullable: true
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
index 17d948a2f4285c2a50b3d3f7f31407c29d8f2048..2a37d81b46084fc748ac1bd24b305877b04cb292 100644 (file)
@@ -336,7 +336,11 @@ paths:
             type: string
         - in: query
           name: category
-          description: An event category to filter events by.
+          description: >
+            An event category to filter events by. These categories are subject
+            to change depending on the version of Patchwork deployed and are
+            not subject to the versionining constraints present across the rest
+            of the API.
           schema:
             title: ''
             type: string
@@ -394,18 +398,13 @@ paths:
                     mapping:
                       cover-created: '#/components/schemas/EventCoverCreated'
                       patch-created: '#/components/schemas/EventPatchCreated'
-                      patch-completed: >
-                        '#/components/schemas/EventPatchCompleted'
-                      patch-state-changed: >
-                        '#/components/schemas/EventPatchStateChanged'
-                      patch-relation-changed: >
-                        '#/components/schemas/EventPatchRelationChanged'
-                      patch-delegated: >
-                        '#/components/schemas/EventPatchDelegated'
+                      patch-completed: '#/components/schemas/EventPatchCompleted'
+                      patch-state-changed: '#/components/schemas/EventPatchStateChanged'
+                      patch-relation-changed: '#/components/schemas/EventPatchRelationChanged'
+                      patch-delegated: '#/components/schemas/EventPatchDelegated'
                       check-created: '#/components/schemas/EventCheckCreated'
                       series-created: '#/components/schemas/EventSeriesCreated'
-                      series-completed: >
-                        '#/components/schemas/EventSeriesCompleted'
+                      series-completed: '#/components/schemas/EventSeriesCompleted'
       tags:
         - events
   /api/1.2/patches/:
index 0a9046a51dc5f39755d6a8fe59c3d5b846ee140f..88c4e35579637ae9629fa740559a74814965e63d 100644 (file)
@@ -402,7 +402,11 @@ paths:
             type: string
         - in: query
           name: category
-          description: An event category to filter events by.
+          description: >
+            An event category to filter events by. These categories are subject
+            to change depending on the version of Patchwork deployed and are
+            not subject to the versionining constraints present across the rest
+            of the API.
           schema:
             title: ''
             type: string
@@ -460,18 +464,13 @@ paths:
                     mapping:
                       cover-created: '#/components/schemas/EventCoverCreated'
                       patch-created: '#/components/schemas/EventPatchCreated'
-                      patch-completed: >
-                        '#/components/schemas/EventPatchCompleted'
-                      patch-state-changed: >
-                        '#/components/schemas/EventPatchStateChanged'
-                      patch-relation-changed: >
-                        '#/components/schemas/EventPatchRelationChanged'
-                      patch-delegated: >
-                        '#/components/schemas/EventPatchDelegated'
+                      patch-completed: '#/components/schemas/EventPatchCompleted'
+                      patch-state-changed: '#/components/schemas/EventPatchStateChanged'
+                      patch-relation-changed: '#/components/schemas/EventPatchRelationChanged'
+                      patch-delegated: '#/components/schemas/EventPatchDelegated'
                       check-created: '#/components/schemas/EventCheckCreated'
                       series-created: '#/components/schemas/EventSeriesCreated'
-                      series-completed: >
-                        '#/components/schemas/EventSeriesCompleted'
+                      series-completed: '#/components/schemas/EventSeriesCompleted'
       tags:
         - events
   /api/1.3/patches/: