[Bug 17607] New: Fix patron definition in Swagger
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Bug ID: 17607 Summary: Fix patron definition in Swagger Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Bug 16276 changed the Patron attributes (adding lastseen) but failed to update the swagger/definitions/patron.json file accordingly. To test: - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => FAIL: Definitions are not complete compared to DB schema -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 57423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57423&action=edit Bug 17607: Fix patron definition in Swagger This patch makes the patron swagger definition match the DB schema. To test: - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => FAIL: 'lastseen' field is not declared in the swagger definition - Apply the patch - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => SUCCESS: Tests pass! - Sigh off :-D Sponsored-by: ByWater Solutions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com CC| |lari.taskula@jns.fi, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57423|0 |1 is obsolete| | --- Comment #2 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 57432 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57432&action=edit [SIGNED-OFF]Bug 17607: Fix patron definition in Swagger This patch makes the patron swagger definition match the DB schema. To test: - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => FAIL: 'lastseen' field is not declared in the swagger definition - Apply the patch - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => SUCCESS: Tests pass! - Sigh off :-D Sponsored-by: ByWater Solutions Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> All tests pass successfuly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |hector.hecaxmmx@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57432|0 |1 is obsolete| | --- Comment #3 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 57433 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57433&action=edit [SIGNED-OFF]Bug 17607: Fix patron definition in Swagger This patch makes the patron swagger definition match the DB schema. To test: - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => FAIL: 'lastseen' field is not declared in the swagger definition - Apply the patch - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => SUCCESS: Tests pass! - Sigh off :-D Sponsored-by: ByWater Solutions Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> All tests pass successfuly Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57433|0 |1 is obsolete| | --- Comment #4 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 57435 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57435&action=edit [SIGNED-OFF]Bug 17607: Fix patron definition in Swagger This patch makes the patron swagger definition match the DB schema. To test: - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => FAIL: 'lastseen' field is not declared in the swagger definition - Apply the patch - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => SUCCESS: Tests pass! - Sigh off :-D Sponsored-by: ByWater Solutions Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> All tests pass successfuly Signed-off-by: Lari Taskula <lari.taskula@jns.fi> Fixed a typo: seed -> seen -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 --- Comment #5 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- (In reply to Lari Taskula from comment #4)
Fixed a typo: seed -> seen :) +1
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- QA Remark: We should probably be moving towards stricter validation application wide, and this may be a good one to start with. datelastseen looks like a date for me ;) So we should probably return it in an internationally recognised format. Swagger allows for this with data type format modifiers: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#dat... { type: string, format: date-time } or { type: string, format: date } should suffice depending upon whether this is a date-time or just a short date. What do we think? API consumers like explicit specification and consistency for this sort of thing ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |16276 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Yes, I agree with Martin. We need to standardise our output to make sure we always return the same date type. On the other hand this is a follow-up for bug 16276, and I guess we need it before the release. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16276 [Bug 16276] When automatically deleting expired borrowers, make sure they didn't log in recently -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #7)
Yes, I agree with Martin. We need to standardise our output to make sure we always return the same date type. On the other hand this is a follow-up for bug 16276, and I guess we need it before the release.
Exactly, what Martin proposes is an enhancement, which I agree with, but is out of the scope of this one, that is needed for the next release in less than two weeks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- If it were as simple as adding "format: date" to each of the date fields then I'd have said lets do it here.. but the update-on field is a date-time (and one that's not in standard format yet at that).. So lets just go with this for now and add a followup to specify formats in another bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17620 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17620 [Bug 17620] Fix format of date/data-times in Swagger definition -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17621 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17621 [Bug 17621] API: Should the 'update_on' Patron field really be a datetime? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57435|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 57467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57467&action=edit [PASSED QA] Bug 17607: Fix patron definition in Swagger This patch makes the patron swagger definition match the DB schema. To test: - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => FAIL: 'lastseen' field is not declared in the swagger definition - Apply the patch - Run: $ prove t/db_dependent/api/v1/swagger/definitions.t => SUCCESS: Tests pass! - Sigh off :-D Sponsored-by: ByWater Solutions Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> All tests pass successfuly Signed-off-by: Lari Taskula <lari.taskula@jns.fi> Fixed a typo: seed -> seen Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com Status|Pushed to Master |Pushed to Stable --- Comment #12 from Mason James <mtj@kohaaloha.com> --- (In reply to Kyle M Hall from comment #11)
Pushed to master for 16.11, thanks Tomas!
blocked by enhancement, passing for 16.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17607 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org