Browse Source

Bug 9834: (QA follow-up) API Corrections

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
remotes/origin/19.11.x
Tomás Cohen Arazi 4 years ago
committed by Martin Renvoize
parent
commit
5aaae31a78
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 2
      Koha/REST/V1/Holds.pm
  2. 5
      Koha/Schema/Result/Reserve.pm
  3. 4
      api/v1/swagger/definitions/hold.json

2
Koha/REST/V1/Holds.pm

@ -464,6 +464,7 @@ our $to_api_mapping = {
suspend => 'suspended',
suspend_until => 'suspended_until',
itemtype => 'item_type',
item_level_hold => 'item_level',
};
=head3 $to_model_mapping
@ -486,6 +487,7 @@ our $to_model_mapping = {
suspended => 'suspend',
suspended_until => 'suspend_until',
item_type => 'itemtype',
item_level => 'item_level_hold',
};
1;

5
Koha/Schema/Result/Reserve.pm

@ -349,8 +349,9 @@ __PACKAGE__->belongs_to(
);
__PACKAGE__->add_columns(
'+lowestPriority' => { is_boolean => 1 },
'+suspend' => { is_boolean => 1 }
'+item_level_hold' => { is_boolean => 1 },
'+lowestPriority' => { is_boolean => 1 },
'+suspend' => { is_boolean => 1 }
);
1;

4
api/v1/swagger/definitions/hold.json

@ -74,6 +74,10 @@
"item_type": {
"type": ["string", "null"],
"description": "If record level hold, the optional itemtype of the item the patron is requesting"
},
"item_level": {
"type": "boolean",
"description": "If the hold is placed at item level"
}
}
}

Loading…
Cancel
Save