Bugzilla – Attachment 93765 Details for
Bug 17314
Routes to create, list and delete a purchase suggestion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17314: (QA follow-up) Adjust spec
Bug-17314-QA-follow-up-Adjust-spec.patch (text/plain), 6.89 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-10-04 20:01:46 UTC
(
hide
)
Description:
Bug 17314: (QA follow-up) Adjust spec
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-10-04 20:01:46 UTC
Size:
6.89 KB
patch
obsolete
>From 5c3ace90cb7688f0d714b22588fdddb6da780c6c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 4 Oct 2019 16:58:33 -0300 >Subject: [PATCH] Bug 17314: (QA follow-up) Adjust spec > >This patch makes the exposed attribute names match what is defined in >the internal mapping in the code, and also the query parameters. > >It also: >- Makes 'status' an enum, as we know the list of possible values/codes... >- Removes allow-owner and allow-guarantor, as said before, endpoints in >/public namespace are allowed to use those. I didn't go and write those >endpoints becuase I wasn't sure about the restrictions that apply in the >OPAC and might differ from the ones in the staff interface. >- Some numeric values are marked as such >- Dates are strings in OpenAPI, but there's a way to specify the format >inside the string: "format": "date". Use it >--- > api/v1/swagger/definitions/suggestion.json | 18 ++++++++++-- > api/v1/swagger/paths/suggestions.json | 34 +++++++++++----------- > 2 files changed, 32 insertions(+), 20 deletions(-) > >diff --git a/api/v1/swagger/definitions/suggestion.json b/api/v1/swagger/definitions/suggestion.json >index 57dcaac1cc..3a9c4c828f 100644 >--- a/api/v1/swagger/definitions/suggestion.json >+++ b/api/v1/swagger/definitions/suggestion.json >@@ -11,6 +11,7 @@ > }, > "suggested_date": { > "type": ["string", "null"], >+ "format": "date", > "description": "the suggestion was submitted" > }, > "managed_by": { >@@ -19,6 +20,7 @@ > }, > "managed_date": { > "type": ["string", "null"], >+ "format": "date", > "description": "date the suggestion was updated" > }, > "accepted_by": { >@@ -27,6 +29,7 @@ > }, > "accepted_date": { > "type": ["string", "null"], >+ "format": "date", > "description": "date the suggestion was marked as accepted" > }, > "rejected_by": { >@@ -35,11 +38,18 @@ > }, > "rejected_date": { > "type": ["string", "null"], >+ "format": "date", > "description": "date the suggestion was marked as rejected" > }, > "status": { > "type": "string", >- "description": "suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED)" >+ "description": "Suggestion status", >+ "enum": [ >+ "ASKED", >+ "CHECKED", >+ "ACCEPTED", >+ "REJECTED" >+ ] > }, > "note": { > "type": ["string", "null"], >@@ -55,6 +65,7 @@ > }, > "copyright_date": { > "type": ["string", "null"], >+ "format": "date", > "description": "copyright date of the suggested item" > }, > "publisher_code": { >@@ -63,6 +74,7 @@ > }, > "date_created": { > "type": ["string", "null"], >+ "format": "date", > "description": "date created" > }, > "volume_desc": { >@@ -118,10 +130,10 @@ > "description": "suggested currency for the suggested price" > }, > "item_price": { >- "type": ["string", "null"], >+ "type": ["number", "null"], > "description": "suggested price" > }, >- "total": { >+ "total_price": { > "type": ["string", "null"], > "description": "suggested total cost (price*quantity updated for currency)" > } >diff --git a/api/v1/swagger/paths/suggestions.json b/api/v1/swagger/paths/suggestions.json >index 091f5be01b..e7cc622e88 100644 >--- a/api/v1/swagger/paths/suggestions.json >+++ b/api/v1/swagger/paths/suggestions.json >@@ -6,40 +6,46 @@ > "tags": ["patrons", "suggestions"], > "parameters": [ > { >- "name": "suggestionid", >+ "name": "suggestion_id", > "in": "query", > "type": "integer", > "description": "Internal suggestion identifier" > }, > { >- "name": "suggestedby", >+ "name": "suggested_by", > "in": "query", > "type": "integer", > "description": "patron_id for the person making the suggestion, foreign key linking to the borrowers table" > }, > { >- "name": "managedby", >+ "name": "managed_by", > "in": "query", > "type": "integer", > "description": "patron_id for the librarian managing the suggestion, foreign key linking to the borrowers table" > }, > { >- "name": "acceptedby", >+ "name": "accepted_by", > "in": "query", > "type": "integer", > "description": "patron_id for the librarian who accepted the suggestion, foreign key linking to the borrowers table" > }, > { >- "name": "rejectedby", >+ "name": "rejected_by", > "in": "query", > "type": "integer", > "description": "patron_id for the librarian who rejected the suggestion, foreign key linking to the borrowers table" > }, > { >- "name": "STATUS", >+ "name": "status", > "in": "query", > "type": "string", >- "description": "suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED)" >+ "description": "Suggestion status", >+ "enum": [ >+ "ASKED", >+ "CHECKED", >+ "ACCEPTED", >+ "REJECTED" >+ ] > }, > { > "name": "author", >@@ -54,19 +60,19 @@ > "description": "title of the suggested item" > }, > { >- "name": "publishercode", >+ "name": "publisher_code", > "in": "query", > "type": "string", > "description": "publisher of the suggested item" > }, > { >- "name": "date", >+ "name": "date_created", > "in": "query", > "type": "string", > "description": "date created" > }, > { >- "name": "publicationyear", >+ "name": "publication_year", > "in": "query", > "type": "string", > "description": "year of publication" >@@ -84,7 +90,7 @@ > "description": "collection name for the suggested item" > }, > { >- "name": "itemtype", >+ "name": "item_type", > "in": "query", > "type": "string", > "description": "suggested item type" >@@ -111,7 +117,6 @@ > } > }, > "x-koha-authorization": { >- "allow-owner": true, > "permissions": { > "acquisition": "1" > } >@@ -160,7 +165,6 @@ > } > }, > "x-koha-authorization": { >- "allow-owner": true, > "permissions": { > "acquisition": "1" > } >@@ -200,8 +204,6 @@ > } > }, > "x-koha-authorization": { >- "allow-owner": true, >- "allow-guarantor": true, > "permissions": { > "acquisition": "1" > } >@@ -258,7 +260,6 @@ > } > }, > "x-koha-authorization": { >- "allow-owner": true, > "permissions": { > "acquisition": "1" > } >@@ -301,7 +302,6 @@ > } > }, > "x-koha-authorization": { >- "allow-owner": true, > "permissions": { > "acquisition": "1" > } >-- >2.23.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17314
:
58098
|
58100
|
58101
|
58993
|
60133
|
90171
|
90172
|
90176
|
91545
|
91546
|
93761
|
93762
|
93763
|
93764
|
93765
|
108380
|
109972
|
109973
|
109974
|
109975
|
109976
|
109977
|
114113
|
114114
|
114115
|
114116
|
114117
|
114118
|
120111
|
120133
|
120134
|
120135
|
120136
|
125097
|
125098
|
125099
|
125100
|
125101
|
125102
|
125103
|
125104
|
127533
|
127534
|
127535
|
127536