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

(-)a/Koha/Item.pm (+17 lines)
Lines 1273-1278 sub public_read_list { Link Here
1273
    ];
1273
    ];
1274
}
1274
}
1275
1275
1276
=head3 to_api
1277
1278
Overloaded to_api method to ensure item-level itypes is adhered to.
1279
1280
=cut
1281
1282
sub to_api {
1283
    my ($self, $params) = @_;
1284
1285
    my $response = $self->SUPER::to_api($params);
1286
    my $overrides = {};
1287
1288
    $overrides->{effective_item_type_id} = $self->effective_itemtype;
1289
1290
    return { %$response, %$overrides };
1291
}
1292
1276
=head3 to_api_mapping
1293
=head3 to_api_mapping
1277
1294
1278
This method returns the mapping for representing a Koha::Item object
1295
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