Bug 32923: Fix licenses spec
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Mon, 20 Mar 2023 13:25:19 +0000 (13:25 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 20 Mar 2023 16:39:40 +0000 (13:39 -0300)
Bug 32713 is now validating embed and brought this flaw to light.
Before this patch, listing licenses on ERM would result in a 400 bad request

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
api/v1/swagger/paths/erm_licenses.yaml

index 0abc7cf..bca05a2 100644 (file)
       - $ref: "../swagger.yaml#/parameters/q_param"
       - $ref: "../swagger.yaml#/parameters/q_body"
       - $ref: "../swagger.yaml#/parameters/q_header"
+      - name: x-koha-embed
+        in: header
+        required: false
+        description: Embed list sent as a request header
+        type: array
+        items:
+          type: string
+          enum:
+            - vendor.name
     responses:
       200:
         description: A list of agreements' licenses