https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41520
--- Comment #4 from Jan Kissig <[email protected]> --- Created attachment 190907 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190907&action=edit Bug 41520: Filter out record_table from AdditionalFieldValue API responses Bug 35451 added a record_table field to the additional_field_values database table for performance optimization (better joins). However, this field was not added to the OpenAPI schema, and with additionalProperties: false, the API validator rejects responses containing it. Rather than adding this internal implementation detail to the public API schema, this patch adds a custom to_api method to Koha::AdditionalFieldValue that filters out the record_table field. This approach: 1. Keeps the database optimization from Bug 35451 2. Prevents internal implementation details from cluttering the API 3. Maintains context that API consumers already have from parent objects 4. Fixes OpenAPI validation errors for ERM agreements, licenses, and packages using extended_attributes Test plan: 1. Create an ERM agreement with additional fields/extended attributes 2. Access the agreement via the API with extended_attributes embedded 3. Verify the response includes extended_attributes but not record_table 4. Confirm no OpenAPI validation warnings in plack-api-error.log 5. prove t/db_dependent/api/v1/erm_agreements.t 6. Verify all tests pass Signed-off-by: Jan Kissig <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
