Bug 29107: Rename item_type => item_type_id

This simple change renames the attribute in the item object API
representation.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/items.t
=> SUCCESS: Tests pass
2. Run:
   $ git grep 'api/v1/items'
=> SUCCESS: The items routes are not (yet) used in Koha
3. Run:
   $ cd koha-tmpl
   $ git grep --name-only '"embed"'
=> SUCCESS: Only two templates are using embed.
4. Check:
   - register.tt uses it to embed the manager, good
   - parcel.tt uses it to embed items. Alert.
=> SUCCESS: parcel.tt only uses a count on items. No item_type involved.
5. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Tomas Cohen Arazi 2021-09-24 08:28:17 -03:00 committed by Jonathan Druart
parent 9ef23bb642
commit f5ee8ced57
2 changed files with 2 additions and 2 deletions

View File

@ -1284,7 +1284,7 @@ sub to_api_mapping {
ccode => 'collection_code',
materials => 'materials_notes',
uri => 'uri',
itype => 'item_type',
itype => 'item_type_id',
more_subfields_xml => 'extended_subfields',
enumchron => 'serial_issue_number',
copynumber => 'copy_number',

View File

@ -153,7 +153,7 @@
"type": ["string", "null"],
"description": "URL for the item"
},
"item_type": {
"item_type_id": {
"type": ["string", "null"],
"description": "Itemtype defining the type for this item"
},