]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Convert to OpenAPI 3.1
authorStephen Finucane <stephen@that.guru>
Mon, 10 Oct 2022 17:18:41 +0000 (18:18 +0100)
committerStephen Finucane <stephen@that.guru>
Mon, 10 Oct 2022 18:19:19 +0000 (19:19 +0100)
OpenAPI 3.0 has some unspecified behavior regarding the combination of
reference objects with 'nullable' [1]. Despite what random StackOverflow
answers [2] suggest, combining nullable with '$ref' still doesn't work.
Do what's suggested in the issue reporting this behavior [3] and upgrade
to OpenAPI 3.1, allowing us to work around this.

[1] https://github.com/OAI/OpenAPI-Specification/issues/1368
[2] https://stackoverflow.com/a/48114924/613428
[3] https://github.com/OAI/OpenAPI-Specification/issues/1368#issuecomment-930112844

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
patchwork/tests/api/validator.py

index b3de0db5e75df2a810004ba083ee9c54353a736a..e3c867226f8bf8c1d466379fce4867119bc0d9cf 100644 (file)
@@ -2,7 +2,7 @@
 # proposed against the template and updated files generated using the
 # 'generate-schemas.py' tool
 ---
-openapi: '3.0.0'
+openapi: '3.1.0'
 info:
   title: Patchwork API
   description: >
@@ -1495,12 +1495,13 @@ components:
           minLength: 1
           maxLength: 50
         owner:
-          type: object
           title: Owner
           readOnly: true
-          nullable: false
-          allOf:
-            - $ref: '#/components/schemas/UserEmbedded'
+          anyOf:
+            - type: 'null'
+            - type: object
+              allOf:
+                - $ref: '#/components/schemas/UserEmbedded'
         patches:
           title: Patches
           type: array
@@ -1567,10 +1568,11 @@ components:
           description: >
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1582,8 +1584,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     CheckCreate:
       type: object
       required:
@@ -1603,10 +1606,11 @@ components:
           description:
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1618,8 +1622,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     Comment:
       type: object
       properties:
@@ -1645,9 +1650,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -1681,15 +1687,17 @@ components:
           readOnly: true
         addressed:
           title: Addressed
-          type: boolean
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: boolean
     CommentUpdate:
       type: object
       properties:
         addressed:
           title: Addressed
-          type: boolean
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: boolean
     CoverList:
       type: object
       properties:
@@ -1717,9 +1725,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -1794,13 +1803,12 @@ components:
           format: iso8601
           readOnly: true
         actor:
-          type: object
           title: Actor
           description: The user that caused/created this event.
           readOnly: true
-          nullable: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         payload:
           type: object
     EventCoverCreated:
@@ -1873,12 +1881,14 @@ components:
                   $ref: '#/components/schemas/PatchEmbedded'
                 previous_relation:
                   title: Previous relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
                 current_relation:
                   title: Current relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
@@ -1991,9 +2001,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2007,15 +2018,17 @@ components:
           maxLength: 255
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
-          type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -2034,12 +2047,11 @@ components:
           allOf:
             - $ref: '#/components/schemas/PersonEmbedded'
         delegate:
-          type: object
           title: Delegate
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         mbox:
           title: Mbox
           type: string
@@ -2117,15 +2129,18 @@ components:
       properties:
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
           type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -2134,8 +2149,9 @@ components:
           type: boolean
         delegate:
           title: Delegate
-          type: integer
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: integer
         related:
           title: Relations
           type: array
@@ -2167,12 +2183,11 @@ components:
           minLength: 1
           maxLength: 255
         user:
-          type: object
           title: User
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
     Project:
       type: object
       properties:
@@ -2244,19 +2259,21 @@ components:
           maxLength: 64
         list_archive_url:
           title: List archive URL
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         list_archive_url_format:
           title: List archive URL format
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
           description: >
             URL format for the list archive's Message-ID redirector. {} will be
             replaced by the Message-ID.
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         commit_url_format:
           title: Web SCM URL format for a particular commit
           type: string
@@ -2284,9 +2301,10 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2422,10 +2440,11 @@ components:
           description: >
             The target URL to associate with this check. This should be specific
             to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
           readOnly: true
         context:
           title: Context
@@ -2460,9 +2479,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2497,9 +2517,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2539,9 +2560,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2636,19 +2658,21 @@ components:
           maxLength: 2000
         list_archive_url:
           title: List archive URL
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         list_archive_url_format:
           title: List archive URL format
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
           description: >
             URL format for the list archive's Message-ID redirector. {} will be
             replaced by the Message-ID.
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         commit_url_format:
           title: Web SCM URL format for a particular commit
           type: string
@@ -2675,10 +2699,11 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
           readOnly: true
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2697,7 +2722,6 @@ components:
           readOnly: true
     UserEmbedded:
       type: object
-      nullable: true
       properties:
         id:
           title: ID
index 6865534872cde7ca892f48c09cde8b35e9a5ebc7..3c8d9385dae7d3c335ff3f3011139c389093aa45 100644 (file)
@@ -3,7 +3,7 @@
 # proposed against the template and updated files generated using the
 # 'generate-schemas.py' tool
 ---
-openapi: '3.0.0'
+openapi: '3.1.0'
 info:
   title: Patchwork API
   description: >
@@ -1546,12 +1546,13 @@ components:
           minLength: 1
           maxLength: 50
         owner:
-          type: object
           title: Owner
           readOnly: true
-          nullable: false
-          allOf:
-            - $ref: '#/components/schemas/UserEmbedded'
+          anyOf:
+            - type: 'null'
+            - type: object
+              allOf:
+                - $ref: '#/components/schemas/UserEmbedded'
         patches:
           title: Patches
           type: array
@@ -1623,10 +1624,11 @@ components:
           description: >
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1638,8 +1640,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     CheckCreate:
       type: object
       required:
@@ -1659,10 +1662,11 @@ components:
           description:
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1674,8 +1678,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     Comment:
       type: object
       properties:
@@ -1706,9 +1711,10 @@ components:
 {% if version >= (1, 2) %}
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
 {% endif %}
         date:
           title: Date
@@ -1744,15 +1750,17 @@ components:
 {% if version >= (1, 3) %}
         addressed:
           title: Addressed
-          type: boolean
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: boolean
     CommentUpdate:
       type: object
       properties:
         addressed:
           title: Addressed
-          type: boolean
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: boolean
 {% endif %}
     CoverList:
       type: object
@@ -1784,9 +1792,10 @@ components:
 {% if version >= (1, 2) %}
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
 {% endif %}
         date:
           title: Date
@@ -1867,13 +1876,12 @@ components:
           readOnly: true
 {% if version >= (1, 2) %}
         actor:
-          type: object
           title: Actor
           description: The user that caused/created this event.
           readOnly: true
-          nullable: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
 {% endif %}
         payload:
           type: object
@@ -1947,12 +1955,14 @@ components:
                   $ref: '#/components/schemas/PatchEmbedded'
                 previous_relation:
                   title: Previous relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
                 current_relation:
                   title: Current relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
@@ -2068,9 +2078,10 @@ components:
 {% if version >= (1, 2) %}
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
 {% endif %}
         date:
           title: Date
@@ -2085,15 +2096,17 @@ components:
           maxLength: 255
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
-          type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -2112,12 +2125,11 @@ components:
           allOf:
             - $ref: '#/components/schemas/PersonEmbedded'
         delegate:
-          type: object
           title: Delegate
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         mbox:
           title: Mbox
           type: string
@@ -2199,15 +2211,18 @@ components:
       properties:
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
           type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -2216,8 +2231,9 @@ components:
           type: boolean
         delegate:
           title: Delegate
-          type: integer
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: integer
 {% if version >= (1, 2) %}
         related:
           title: Relations
@@ -2251,12 +2267,11 @@ components:
           minLength: 1
           maxLength: 255
         user:
-          type: object
           title: User
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
     Project:
       type: object
       properties:
@@ -2331,19 +2346,21 @@ components:
 {% if version >= (1, 2) %}
         list_archive_url:
           title: List archive URL
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         list_archive_url_format:
           title: List archive URL format
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
           description: >
             URL format for the list archive's Message-ID redirector. {} will be
             replaced by the Message-ID.
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         commit_url_format:
           title: Web SCM URL format for a particular commit
           type: string
@@ -2374,9 +2391,10 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2514,10 +2532,11 @@ components:
           description: >
             The target URL to associate with this check. This should be specific
             to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
           readOnly: true
         context:
           title: Context
@@ -2557,9 +2576,10 @@ components:
 {% if version >= (1, 2) %}
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
 {% endif %}
         date:
           title: Date
@@ -2598,9 +2618,10 @@ components:
 {% if version >= (1, 2) %}
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
 {% endif %}
         date:
           title: Date
@@ -2644,9 +2665,10 @@ components:
 {% if version >= (1, 2) %}
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
 {% endif %}
         date:
           title: Date
@@ -2743,19 +2765,21 @@ components:
 {% if version >= (1, 2) %}
         list_archive_url:
           title: List archive URL
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         list_archive_url_format:
           title: List archive URL format
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
           description: >
             URL format for the list archive's Message-ID redirector. {} will be
             replaced by the Message-ID.
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         commit_url_format:
           title: Web SCM URL format for a particular commit
           type: string
@@ -2785,10 +2809,11 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
           readOnly: true
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2807,7 +2832,6 @@ components:
           readOnly: true
     UserEmbedded:
       type: object
-      nullable: true
       properties:
         id:
           title: ID
index 6c3893ec780efcbfb8c38e35faf2988597a8f64e..da8dc3d126aae39ef142c6e349580ca2f1ea24e9 100644 (file)
@@ -2,7 +2,7 @@
 # proposed against the template and updated files generated using the
 # 'generate-schemas.py' tool
 ---
-openapi: '3.0.0'
+openapi: '3.1.0'
 info:
   title: Patchwork API
   description: >
@@ -1203,12 +1203,13 @@ components:
           minLength: 1
           maxLength: 50
         owner:
-          type: object
           title: Owner
           readOnly: true
-          nullable: false
-          allOf:
-            - $ref: '#/components/schemas/UserEmbedded'
+          anyOf:
+            - type: 'null'
+            - type: object
+              allOf:
+                - $ref: '#/components/schemas/UserEmbedded'
         patches:
           title: Patches
           type: array
@@ -1257,10 +1258,11 @@ components:
           description: >
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1272,8 +1274,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     CheckCreate:
       type: object
       required:
@@ -1293,10 +1296,11 @@ components:
           description:
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1308,8 +1312,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     Comment:
       type: object
       properties:
@@ -1509,12 +1514,14 @@ components:
                   $ref: '#/components/schemas/PatchEmbedded'
                 previous_relation:
                   title: Previous relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
                 current_relation:
                   title: Current relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
@@ -1633,15 +1640,17 @@ components:
           maxLength: 255
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
-          type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -1660,12 +1669,11 @@ components:
           allOf:
             - $ref: '#/components/schemas/PersonEmbedded'
         delegate:
-          type: object
           title: Delegate
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         mbox:
           title: Mbox
           type: string
@@ -1733,15 +1741,18 @@ components:
       properties:
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
           type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -1750,8 +1761,9 @@ components:
           type: boolean
         delegate:
           title: Delegate
-          type: integer
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: integer
     Person:
       type: object
       properties:
@@ -1778,12 +1790,11 @@ components:
           minLength: 1
           maxLength: 255
         user:
-          type: object
           title: User
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
     Project:
       type: object
       properties:
@@ -1861,9 +1872,10 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -1972,10 +1984,11 @@ components:
           description: >
             The target URL to associate with this check. This should be specific
             to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
           readOnly: true
         context:
           title: Context
@@ -2166,10 +2179,11 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
           readOnly: true
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2188,7 +2202,6 @@ components:
           readOnly: true
     UserEmbedded:
       type: object
-      nullable: true
       properties:
         id:
           title: ID
index 7e2299c5bb3ec61fae8f6246609848092e1a6add..2837f6646052075e8f3d01120ca88a9fc9aec3d1 100644 (file)
@@ -2,7 +2,7 @@
 # proposed against the template and updated files generated using the
 # 'generate-schemas.py' tool
 ---
-openapi: '3.0.0'
+openapi: '3.1.0'
 info:
   title: Patchwork API
   description: >
@@ -1208,12 +1208,13 @@ components:
           minLength: 1
           maxLength: 50
         owner:
-          type: object
           title: Owner
           readOnly: true
-          nullable: false
-          allOf:
-            - $ref: '#/components/schemas/UserEmbedded'
+          anyOf:
+            - type: 'null'
+            - type: object
+              allOf:
+                - $ref: '#/components/schemas/UserEmbedded'
         patches:
           title: Patches
           type: array
@@ -1262,10 +1263,11 @@ components:
           description: >
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1277,8 +1279,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     CheckCreate:
       type: object
       required:
@@ -1298,10 +1301,11 @@ components:
           description:
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1313,8 +1317,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     Comment:
       type: object
       properties:
@@ -1534,12 +1539,14 @@ components:
                   $ref: '#/components/schemas/PatchEmbedded'
                 previous_relation:
                   title: Previous relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
                 current_relation:
                   title: Current relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
@@ -1663,15 +1670,17 @@ components:
           maxLength: 255
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
-          type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -1690,12 +1699,11 @@ components:
           allOf:
             - $ref: '#/components/schemas/PersonEmbedded'
         delegate:
-          type: object
           title: Delegate
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         mbox:
           title: Mbox
           type: string
@@ -1768,15 +1776,18 @@ components:
       properties:
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
           type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -1785,8 +1796,9 @@ components:
           type: boolean
         delegate:
           title: Delegate
-          type: integer
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: integer
     Person:
       type: object
       properties:
@@ -1813,12 +1825,11 @@ components:
           minLength: 1
           maxLength: 255
         user:
-          type: object
           title: User
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
     Project:
       type: object
       properties:
@@ -1912,9 +1923,10 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2023,10 +2035,11 @@ components:
           description: >
             The target URL to associate with this check. This should be specific
             to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
           readOnly: true
         context:
           title: Context
@@ -2237,10 +2250,11 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
           readOnly: true
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2259,7 +2273,6 @@ components:
           readOnly: true
     UserEmbedded:
       type: object
-      nullable: true
       properties:
         id:
           title: ID
index 93c3e97eb0854b3ea771e66a7b4249cda4dfc4f6..3d6fbcee1ed163d37999dfad6a9e3bdd1e12d274 100644 (file)
@@ -2,7 +2,7 @@
 # proposed against the template and updated files generated using the
 # 'generate-schemas.py' tool
 ---
-openapi: '3.0.0'
+openapi: '3.1.0'
 info:
   title: Patchwork API
   description: >
@@ -1355,12 +1355,13 @@ components:
           minLength: 1
           maxLength: 50
         owner:
-          type: object
           title: Owner
           readOnly: true
-          nullable: false
-          allOf:
-            - $ref: '#/components/schemas/UserEmbedded'
+          anyOf:
+            - type: 'null'
+            - type: object
+              allOf:
+                - $ref: '#/components/schemas/UserEmbedded'
         patches:
           title: Patches
           type: array
@@ -1427,10 +1428,11 @@ components:
           description: >
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1442,8 +1444,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     CheckCreate:
       type: object
       required:
@@ -1463,10 +1466,11 @@ components:
           description:
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1478,8 +1482,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     Comment:
       type: object
       properties:
@@ -1500,9 +1505,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -1561,9 +1567,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -1638,13 +1645,12 @@ components:
           format: iso8601
           readOnly: true
         actor:
-          type: object
           title: Actor
           description: The user that caused/created this event.
           readOnly: true
-          nullable: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         payload:
           type: object
     EventCoverCreated:
@@ -1717,12 +1723,14 @@ components:
                   $ref: '#/components/schemas/PatchEmbedded'
                 previous_relation:
                   title: Previous relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
                 current_relation:
                   title: Current relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
@@ -1835,9 +1843,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -1851,15 +1860,17 @@ components:
           maxLength: 255
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
-          type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -1878,12 +1889,11 @@ components:
           allOf:
             - $ref: '#/components/schemas/PersonEmbedded'
         delegate:
-          type: object
           title: Delegate
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         mbox:
           title: Mbox
           type: string
@@ -1961,15 +1971,18 @@ components:
       properties:
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
           type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -1978,8 +1991,9 @@ components:
           type: boolean
         delegate:
           title: Delegate
-          type: integer
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: integer
         related:
           title: Relations
           type: array
@@ -2011,12 +2025,11 @@ components:
           minLength: 1
           maxLength: 255
         user:
-          type: object
           title: User
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
     Project:
       type: object
       properties:
@@ -2088,19 +2101,21 @@ components:
           maxLength: 64
         list_archive_url:
           title: List archive URL
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         list_archive_url_format:
           title: List archive URL format
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
           description: >
             URL format for the list archive's Message-ID redirector. {} will be
             replaced by the Message-ID.
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         commit_url_format:
           title: Web SCM URL format for a particular commit
           type: string
@@ -2128,9 +2143,10 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2266,10 +2282,11 @@ components:
           description: >
             The target URL to associate with this check. This should be specific
             to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
           readOnly: true
         context:
           title: Context
@@ -2299,9 +2316,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2336,9 +2354,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2378,9 +2397,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2475,19 +2495,21 @@ components:
           maxLength: 2000
         list_archive_url:
           title: List archive URL
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         list_archive_url_format:
           title: List archive URL format
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
           description: >
             URL format for the list archive's Message-ID redirector. {} will be
             replaced by the Message-ID.
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         commit_url_format:
           title: Web SCM URL format for a particular commit
           type: string
@@ -2514,10 +2536,11 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
           readOnly: true
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2536,7 +2559,6 @@ components:
           readOnly: true
     UserEmbedded:
       type: object
-      nullable: true
       properties:
         id:
           title: ID
index 8663406d1a3386a5c02a66dc157fe4545da07621..0755573a20c3c5b1e6567e2ed9081f48b292ebce 100644 (file)
@@ -2,7 +2,7 @@
 # proposed against the template and updated files generated using the
 # 'generate-schemas.py' tool
 ---
-openapi: '3.0.0'
+openapi: '3.1.0'
 info:
   title: Patchwork API
   description: >
@@ -1495,12 +1495,13 @@ components:
           minLength: 1
           maxLength: 50
         owner:
-          type: object
           title: Owner
           readOnly: true
-          nullable: false
-          allOf:
-            - $ref: '#/components/schemas/UserEmbedded'
+          anyOf:
+            - type: 'null'
+            - type: object
+              allOf:
+                - $ref: '#/components/schemas/UserEmbedded'
         patches:
           title: Patches
           type: array
@@ -1567,10 +1568,11 @@ components:
           description: >
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1582,8 +1584,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     CheckCreate:
       type: object
       required:
@@ -1603,10 +1606,11 @@ components:
           description:
             The target URL to associate with this check. This should be
             specific to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
         context:
           title: Context
           description: >
@@ -1618,8 +1622,9 @@ components:
         description:
           title: Description
           description: A brief description of the check.
-          type: string
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
     Comment:
       type: object
       properties:
@@ -1645,9 +1650,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -1681,15 +1687,17 @@ components:
           readOnly: true
         addressed:
           title: Addressed
-          type: boolean
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: boolean
     CommentUpdate:
       type: object
       properties:
         addressed:
           title: Addressed
-          type: boolean
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: boolean
     CoverList:
       type: object
       properties:
@@ -1717,9 +1725,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -1794,13 +1803,12 @@ components:
           format: iso8601
           readOnly: true
         actor:
-          type: object
           title: Actor
           description: The user that caused/created this event.
           readOnly: true
-          nullable: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         payload:
           type: object
     EventCoverCreated:
@@ -1873,12 +1881,14 @@ components:
                   $ref: '#/components/schemas/PatchEmbedded'
                 previous_relation:
                   title: Previous relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
                 current_relation:
                   title: Current relation
-                  type: string
-                  nullable: true
+                  oneOf:
+                    - type: 'null'
+                    - type: string
     EventPatchDelegated:
       allOf:
         - $ref: '#/components/schemas/EventBase'
@@ -1991,9 +2001,10 @@ components:
           maxLength: 255
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2007,15 +2018,17 @@ components:
           maxLength: 255
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
-          type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -2034,12 +2047,11 @@ components:
           allOf:
             - $ref: '#/components/schemas/PersonEmbedded'
         delegate:
-          type: object
           title: Delegate
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
         mbox:
           title: Mbox
           type: string
@@ -2117,15 +2129,18 @@ components:
       properties:
         commit_ref:
           title: Commit ref
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         pull_url:
           title: Pull URL
           type: string
-          format: uri
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
+              format: uri
         state:
           title: State
           type: string
@@ -2134,8 +2149,9 @@ components:
           type: boolean
         delegate:
           title: Delegate
-          type: integer
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: integer
         related:
           title: Relations
           type: array
@@ -2167,12 +2183,11 @@ components:
           minLength: 1
           maxLength: 255
         user:
-          type: object
           title: User
-          nullable: true
           readOnly: true
-          allOf:
+          anyOf:
             - $ref: '#/components/schemas/UserEmbedded'
+            - type: 'null'
     Project:
       type: object
       properties:
@@ -2244,19 +2259,21 @@ components:
           maxLength: 64
         list_archive_url:
           title: List archive URL
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         list_archive_url_format:
           title: List archive URL format
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
           description: >
             URL format for the list archive's Message-ID redirector. {} will be
             replaced by the Message-ID.
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         commit_url_format:
           title: Web SCM URL format for a particular commit
           type: string
@@ -2284,9 +2301,10 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2422,10 +2440,11 @@ components:
           description: >
             The target URL to associate with this check. This should be specific
             to the patch.
-          type: string
-          format: uri
-          maxLength: 200
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 200
           readOnly: true
         context:
           title: Context
@@ -2460,9 +2479,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2497,9 +2517,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2539,9 +2560,10 @@ components:
           minLength: 1
         list_archive_url:
           title: List archive URL
-          type: string
           readOnly: true
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
         date:
           title: Date
           type: string
@@ -2636,19 +2658,21 @@ components:
           maxLength: 2000
         list_archive_url:
           title: List archive URL
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         list_archive_url_format:
           title: List archive URL format
-          type: string
-          format: uri
-          maxLength: 2000
-          nullable: true
           description: >
             URL format for the list archive's Message-ID redirector. {} will be
             replaced by the Message-ID.
+          oneOf:
+            - type: 'null'
+            - type: string
+              format: uri
+              maxLength: 2000
         commit_url_format:
           title: Web SCM URL format for a particular commit
           type: string
@@ -2675,10 +2699,11 @@ components:
           description: >
             An optional name to associate with the series, e.g. "John's PCI
             series".
-          type: string
           readOnly: true
-          maxLength: 255
-          nullable: true
+          oneOf:
+            - type: 'null'
+            - type: string
+              maxLength: 255
         date:
           title: Date
           type: string
@@ -2697,7 +2722,6 @@ components:
           readOnly: true
     UserEmbedded:
       type: object
-      nullable: true
       properties:
         id:
           title: ID
index 35575461d571fa2a44c1ff8b4caa298d4acdfe70..3d4d0195acd5a65b6a2b55f18a24e299b3a65e57 100644 (file)
@@ -18,7 +18,7 @@ from openapi_core.templating import util
 from openapi_core.unmarshalling.schemas.formatters import Formatter
 from openapi_core.validation.request.validators import RequestValidator
 from openapi_core.validation.response.validators import ResponseValidator
-from openapi_schema_validator import OAS30Validator
+from openapi_schema_validator import OAS31Validator
 from rest_framework import status
 import yaml
 
@@ -118,7 +118,7 @@ def validate_data(
     response = DjangoOpenAPIResponse(response)
 
     schema_unmarshallers_factory = SchemaUnmarshallersFactory(
-        OAS30Validator,
+        OAS31Validator,
         custom_formatters=CUSTOM_FORMATTERS,
         # context=UnmarshalContext.RESPONSE,
     )