From b63fd774c181b96e514122c0d693f222b99b1cdd Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 10 Nov 2017 16:16:49 -0300 Subject: [PATCH] Bug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens --- Koha/Schema/Result/Issue.pm | 5 +++++ api/v1/swagger/definitions/checkout.json | 23 +++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index e82886aae5..a7277446c3 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -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", diff --git a/api/v1/swagger/definitions/checkout.json b/api/v1/swagger/definitions/checkout.json index 6eadd55803..4267eba24c 100644 --- a/api/v1/swagger/definitions/checkout.json +++ b/api/v1/swagger/definitions/checkout.json @@ -12,37 +12,52 @@ "$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" } } } -- 2.39.5