Browse Source

Bug 13895: Adapt naming according to voted RFC

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec 5 years ago
committed by Nick Clemens
parent
commit
a142369b30
  1. 4
      Koha/REST/V1/Checkout.pm
  2. 6
      api/v1/swagger/definitions/checkout.json
  3. 4
      api/v1/swagger/parameters.json
  4. 2
      api/v1/swagger/parameters/checkout.json
  5. 4
      api/v1/swagger/paths/checkouts.json

4
Koha/REST/V1/Checkout.pm

@ -186,7 +186,7 @@ our $to_api_mapping = {
branchcode => 'library_id', branchcode => 'library_id',
returndate => 'checkin_date', returndate => 'checkin_date',
lastreneweddate => 'last_renewed_date', lastreneweddate => 'last_renewed_date',
issuedate => 'checked_out_date', issuedate => 'checkout_date',
notedate => 'note_date', notedate => 'note_date',
}; };
@ -202,7 +202,7 @@ our $to_model_mapping = {
library_id => 'branchcode', library_id => 'branchcode',
checkin_date => 'returndate', checkin_date => 'returndate',
last_renewed_date => 'lastreneweddate', last_renewed_date => 'lastreneweddate',
checked_out_date => 'issuedate', checkout_date => 'issuedate',
note_date => 'notedate', note_date => 'notedate',
}; };

6
api/v1/swagger/definitions/checkout.json

@ -39,11 +39,15 @@
"type": "boolean", "type": "boolean",
"description": "Auto renewal" "description": "Auto renewal"
}, },
"auto_renew_error": {
"type": ["string", "null"],
"description": "Auto renewal error"
},
"timestamp": { "timestamp": {
"type": "string", "type": "string",
"description": "Last update time" "description": "Last update time"
}, },
"checked_out_date": { "checkout_date": {
"type": "string", "type": "string",
"format": "date-time", "format": "date-time",
"description": "Date the item was issued" "description": "Date the item was issued"

4
api/v1/swagger/parameters.json

@ -17,8 +17,8 @@
"vendoridPathParam": { "vendoridPathParam": {
"$ref": "parameters/vendor.json#/vendoridPathParam" "$ref": "parameters/vendor.json#/vendoridPathParam"
}, },
"checkoutIdPathParam": { "checkout_id_pp": {
"$ref": "parameters/checkout.json#/checkoutIdPathParam" "$ref": "parameters/checkout.json#/checkout_id_pp"
}, },
"match": { "match": {
"name": "_match", "name": "_match",

2
api/v1/swagger/parameters/checkout.json

@ -1,5 +1,5 @@
{ {
"checkoutIdPathParam": { "checkout_id_pp": {
"name": "checkout_id", "name": "checkout_id",
"in": "path", "in": "path",
"description": "Internal checkout identifier", "description": "Internal checkout identifier",

4
api/v1/swagger/paths/checkouts.json

@ -39,7 +39,7 @@
"operationId": "getCheckout", "operationId": "getCheckout",
"tags": ["patrons", "checkouts"], "tags": ["patrons", "checkouts"],
"parameters": [{ "parameters": [{
"$ref": "../parameters.json#/checkoutIdPathParam" "$ref": "../parameters.json#/checkout_id_pp"
}], }],
"produces": ["application/json"], "produces": ["application/json"],
"responses": { "responses": {
@ -69,7 +69,7 @@
"operationId": "renewCheckout", "operationId": "renewCheckout",
"tags": ["patrons", "checkouts"], "tags": ["patrons", "checkouts"],
"parameters": [{ "parameters": [{
"$ref": "../parameters.json#/checkoutIdPathParam" "$ref": "../parameters.json#/checkout_id_pp"
}], }],
"produces": ["application/json"], "produces": ["application/json"],
"responses": { "responses": {

Loading…
Cancel
Save