View | Details | Raw Unified | Return to bug 29105
Collapse All | Expand All

(-)a/Koha/Item.pm (+17 lines)
Lines 1297-1302 sub public_read_list { Link Here
1297
    ];
1297
    ];
1298
}
1298
}
1299
1299
1300
=head3 to_api
1301
1302
Overloaded to_api method to ensure item-level itypes is adhered to.
1303
1304
=cut
1305
1306
sub to_api {
1307
    my ($self, $params) = @_;
1308
1309
    my $response = $self->SUPER::to_api($params);
1310
    my $overrides = {};
1311
1312
    $overrides->{effective_item_type_id} = $self->effective_itemtype;
1313
1314
    return { %$response, %$overrides };
1315
}
1316
1300
=head3 to_api_mapping
1317
=head3 to_api_mapping
1301
1318
1302
This method returns the mapping for representing a Koha::Item object
1319
This method returns the mapping for representing a Koha::Item object
(-)a/api/v1/swagger/definitions/item.yaml (-1 / +5 lines)
Lines 183-188 properties: Link Here
183
      - string
183
      - string
184
      - "null"
184
      - "null"
185
    description: Itemtype defining the type for this item
185
    description: Itemtype defining the type for this item
186
  effective_item_type_id:
187
    type:
188
      - string
189
      - "null"
190
    description: Effective itemtype defining the type for this item_id
186
  extended_subfields:
191
  extended_subfields:
187
    type:
192
    type:
188
      - string
193
      - string
189
- 

Return to bug 29105