Bug 32030: ERM - Agreement documents - REST API
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 16 May 2022 16:30:56 +0000 (18:30 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 8 Nov 2022 12:43:53 +0000 (09:43 -0300)
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
api/v1/swagger/definitions/erm_agreement.yaml
api/v1/swagger/definitions/erm_agreement_document.yaml [new file with mode: 0644]
api/v1/swagger/paths/erm_agreements.yaml

index c1f41f8..8e4bf4b 100644 (file)
@@ -59,6 +59,11 @@ properties:
     description: agreement licenses
     items:
       $ref: erm_agreement_license.yaml
+  documents:
+    type: array
+    description: documents
+    items:
+      $ref: erm_agreement_document.yaml
 
 additionalProperties: false
 required:
diff --git a/api/v1/swagger/definitions/erm_agreement_document.yaml b/api/v1/swagger/definitions/erm_agreement_document.yaml
new file mode 100644 (file)
index 0000000..d4f9e29
--- /dev/null
@@ -0,0 +1,56 @@
+---
+type: object
+properties:
+  document_id:
+    type: integer
+    description: internally assigned identifier
+    readOnly: true
+  agreement_id:
+    type: integer
+    description: Internal agreement identifier
+  file_name:
+    type:
+      - string
+      - "null"
+    description: Name of the file
+  file_type:
+    type:
+      - string
+      - "null"
+    description: Name of the file
+  file_description:
+    type:
+      - string
+      - "null"
+    description: Description of the file
+  file_content:
+    type:
+      - string
+      - "null"
+    description: Content of the file
+  uploaded_on:
+    type:
+      - string
+      - "null"
+    format: date-time
+    description: Datetime of the upload
+  file_type:
+    type:
+      - string
+      - "null"
+    description: Name of the file
+  physical_location:
+    type:
+      - string
+      - "null"
+    description: Physical location of the document
+  uri:
+    description: URI of the document
+    type:
+      - string
+      - "null"
+  notes:
+    type:
+      - string
+      - "null"
+additionalProperties: false
index e8b7358..9a5efa0 100644 (file)
       - agreement_relationships
       - agreement_relationships.agreement
       - agreement_relationships.related_agreement
+      - documents
   put:
     x-mojo-to: ERM::Agreements#update
     operationId: updateErmAgreements
       - user_roles
       - agreement_licenses
       - agreement_relationships
+      - documents
   delete:
     x-mojo-to: ERM::Agreements#delete
     operationId: deleteErmAgreements