Bug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 10 Nov 2017 19:16:49 +0000 (16:16 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 28 Mar 2019 19:38:41 +0000 (19:38 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Koha/Schema/Result/Issue.pm
api/v1/swagger/definitions/checkout.json

index e82886a..a727744 100644 (file)
@@ -251,6 +251,11 @@ __PACKAGE__->belongs_to(
 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-23 13:51:40
 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+mlcId4odhAFp3HHgV/+tg
 
+__PACKAGE__->add_columns(
+    '+auto_renew'      => { is_boolean => 1 },
+    '+onsite_checkout' => { is_boolean => 1 }
+);
+
 __PACKAGE__->belongs_to(
     "borrower",
     "Koha::Schema::Result::Borrower",
index 6eadd55..4267eba 100644 (file)
       "$ref": "../x-primitives.json#/itemnumber"
     },
     "date_due": {
+      "type": "string",
       "description": "Due date"
     },
     "branchcode": {
-      "$ref": "../x-primitives.json#/branchcode"
+      "type": "string",
+      "description": "code of the library the item was checked out"
     },
     "issuingbranch": {
+      "type": "string",
       "description": "Code of the branch where issue was made"
     },
     "returndate": {
+      "type": ["string", "null"],
       "description": "Date the item was returned"
     },
     "lastreneweddate": {
+      "type": ["string", "null"],
       "description": "Date the item was last renewed"
     },
-    "return": {
-      "description": "?"
-    },
     "renewals": {
+      "type": ["integer", "null"],
       "description": "Number of renewals"
     },
     "auto_renew": {
+      "type": "boolean",
       "description": "Auto renewal"
     },
     "timestamp": {
+      "type": "string",
       "description": "Last update time"
     },
     "issuedate": {
+      "type": ["string", "null"],
       "description": "Date the item was issued"
     },
     "onsite_checkout": {
+      "type": "boolean",
       "description": "On site checkout"
+    },
+    "note": {
+      "type": ["string", "null"],
+      "description": "Issue note text"
+    },
+    "notedate": {
+      "type": ["string", "null"],
+      "description": "Datetime of the issue note"
     }
   }
 }