]> git.koha-community.org Git - koha.git/commit
Bug 28369: Set additionalProperties: false and fix things
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 18 May 2021 12:06:45 +0000 (09:06 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 May 2021 07:28:18 +0000 (09:28 +0200)
commita554b5a54572334029ca4f5f036e63140d2a4bcd
treea5778e9539b6f20bcec43214d35958149d1081a9
parentcfe3e013a2e79c5b3a6868d1c2c0eb8618fd79e0
Bug 28369: Set additionalProperties: false and fix things

This patch performs a cleanup on the holds routes:
- It adds additionalProperties: false to all missing routes
- It syncs the spec with the guidelines
- additionalProperties: false highlighted some attributes read in the
  controlled weren't declared on the spec, adding them
- PUT /holds/:hold_id is moved to PATCH, as it makes more sense and
  gathered opinions lean towards that

To test:
1. Apply the tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Lots of things are wrong with the API
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Holds.pm
api/v1/swagger/paths/holds.json