Bug 39838

Summary: Vendor alias object under specified
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: REST APIAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P1 - high CC: david, jonathan.druart, martin.renvoize, matt.blenkinsop, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 38010    
Bug Blocks: 39837    
Attachments: Bug 39838: Add `vendor_alias` definition in swagger
Bug 39838: Add `vendor_alias` definition in swagger
Bug 39838: Rename (aqbookseller_aliases) column alias_id to vendor_alias_id
Bug 39838: Add `vendor_alias` definition in swagger
Bug 39838: Fix uses of `alias_id`
Bug 39838: Rename (aqbookseller_aliases) column alias_id to vendor_alias_id
Bug 39838: Add `vendor_alias` definition in swagger
Bug 39838: Fix uses of `alias_id`
Bug 39838: Rename (aqbookseller_aliases) column alias_id to vendor_alias_id
Bug 39838: Add `vendor_alias` definition in swagger
Bug 39838: Fix uses of `alias_id`

Description Tomás Cohen Arazi (tcohen) 2025-05-05 17:26:15 UTC
Bug 38010 slipped in the use of the `aqbookseller_aliases` table by defining `interfaces` to be of type array.

This should be specified in the spec and validated.

Note: the column names are good and don't seem to need mapping.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-05-05 17:29:27 UTC
I just noted there's a `vendor_alias.yaml` file. Closing as invalid for now.
Comment 2 Tomás Cohen Arazi (tcohen) 2025-05-05 17:34:50 UTC
Created attachment 181932 [details] [review]
Bug 39838: Add `vendor_alias` definition in swagger

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi (tcohen) 2025-05-05 17:36:51 UTC
I patched it anyway as I found a copy and paste error.

As there doesn't exist an endpoint for retrieving the aliases, it is not obvious that we need to include the object definition. But I think we should, and also that we should have such (trivial?) endpoint at some point. Out of the scope of this bug, though.
Comment 4 David Nind 2025-05-05 17:51:29 UTC
Created attachment 181933 [details] [review]
Bug 39838: Add `vendor_alias` definition in swagger

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Tomás Cohen Arazi (tcohen) 2025-05-05 18:00:07 UTC
Created attachment 181934 [details] [review]
Bug 39838: Rename (aqbookseller_aliases) column alias_id to vendor_alias_id
Comment 6 Tomás Cohen Arazi (tcohen) 2025-05-05 18:00:09 UTC
Created attachment 181935 [details] [review]
Bug 39838: Add `vendor_alias` definition in swagger

This patch adapts the definition file and also tweaks the attribute
names and descriptions to match our guidelines.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi (tcohen) 2025-05-05 18:00:12 UTC
Created attachment 181936 [details] [review]
Bug 39838: Fix uses of `alias_id`
Comment 8 Tomás Cohen Arazi (tcohen) 2025-05-05 18:01:17 UTC
(In reply to David Nind from comment #4)
> Created attachment 181933 [details] [review] [review]

Thanks, but this needs more thinking right now. I reckon the definition was added back in 22.11! And this needs Jonathan and Matt's opinion before moving forward.
Comment 9 Martin Renvoize (ashimema) 2025-05-13 06:30:10 UTC
Created attachment 182320 [details] [review]
Bug 39838: Rename (aqbookseller_aliases) column alias_id to vendor_alias_id

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 10 Martin Renvoize (ashimema) 2025-05-13 06:30:13 UTC
Created attachment 182321 [details] [review]
Bug 39838: Add `vendor_alias` definition in swagger

This patch adapts the definition file and also tweaks the attribute
names and descriptions to match our guidelines.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 11 Martin Renvoize (ashimema) 2025-05-13 06:30:16 UTC
Created attachment 182322 [details] [review]
Bug 39838: Fix uses of `alias_id`

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 12 Martin Renvoize (ashimema) 2025-05-13 06:31:53 UTC
Created attachment 182323 [details] [review]
Bug 39838: Rename (aqbookseller_aliases) column alias_id to vendor_alias_id

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 13 Martin Renvoize (ashimema) 2025-05-13 06:31:55 UTC
Created attachment 182324 [details] [review]
Bug 39838: Add `vendor_alias` definition in swagger

This patch adapts the definition file and also tweaks the attribute
names and descriptions to match our guidelines.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 14 Martin Renvoize (ashimema) 2025-05-13 06:31:58 UTC
Created attachment 182325 [details] [review]
Bug 39838: Fix uses of `alias_id`

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 15 Martin Renvoize (ashimema) 2025-05-13 06:32:40 UTC
I think this is important to go in with all the Vendors work we've recently pushed.

Passing QA
Comment 16 Katrin Fischer 2025-05-13 16:33:44 UTC
Will push, but can you explain why the change from alias_id to vendor_alias_id was important?
Comment 17 Katrin Fischer 2025-05-13 16:48:03 UTC
Pushed for 25.05!

Well done everyone, thank you!