Bugzilla – Attachment 103802 Details for
Bug 25279
Make the cities list use the API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25279: Add general query parameters to the /cities route
Bug-25279-Add-general-query-parameters-to-the-citi.patch (text/plain), 5.82 KB, created by
Kyle M Hall (khall)
on 2020-04-27 19:36:21 UTC
(
hide
)
Description:
Bug 25279: Add general query parameters to the /cities route
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-04-27 19:36:21 UTC
Size:
5.82 KB
patch
obsolete
>From ea2cb874b64150adb008898c2c553998c4e75b76 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 24 Apr 2020 11:48:58 -0300 >Subject: [PATCH] Bug 25279: Add general query parameters to the /cities route > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > api/v1/swagger/paths/cities.json | 157 ++++++++++++++++++++----------- > 1 file changed, 101 insertions(+), 56 deletions(-) > >diff --git a/api/v1/swagger/paths/cities.json b/api/v1/swagger/paths/cities.json >index 77ee394af4..d21d7627f6 100644 >--- a/api/v1/swagger/paths/cities.json >+++ b/api/v1/swagger/paths/cities.json >@@ -3,35 +3,63 @@ > "get": { > "x-mojo-to": "Cities#list", > "operationId": "listCities", >- "tags": ["cities"], >+ "tags": [ >+ "cities" >+ ], > "produces": [ > "application/json" > ], >- "parameters": [{ >- "name": "name", >- "in": "query", >- "description": "Case insensative search on city name", >- "required": false, >- "type": "string" >- }, { >- "name": "state", >- "in": "query", >- "description": "Case insensative search on city state", >- "required": false, >- "type": "string" >- }, { >- "name": "country", >- "in": "query", >- "description": "Case insensative search on city country", >- "required": false, >- "type": "string" >- }, { >- "name": "postal_code", >- "in": "query", >- "description": "Case Insensative search on city postal code", >- "required": false, >- "type": "string" >- }], >+ "parameters": [ >+ { >+ "name": "name", >+ "in": "query", >+ "description": "Case insensative search on city name", >+ "required": false, >+ "type": "string" >+ }, >+ { >+ "name": "state", >+ "in": "query", >+ "description": "Case insensative search on city state", >+ "required": false, >+ "type": "string" >+ }, >+ { >+ "name": "country", >+ "in": "query", >+ "description": "Case insensative search on city country", >+ "required": false, >+ "type": "string" >+ }, >+ { >+ "name": "postal_code", >+ "in": "query", >+ "description": "Case Insensative search on city postal code", >+ "required": false, >+ "type": "string" >+ }, >+ { >+ "$ref": "../parameters.json#/match" >+ }, >+ { >+ "$ref": "../parameters.json#/order_by" >+ }, >+ { >+ "$ref": "../parameters.json#/page" >+ }, >+ { >+ "$ref": "../parameters.json#/per_page" >+ }, >+ { >+ "$ref": "../parameters.json#/q_param" >+ }, >+ { >+ "$ref": "../parameters.json#/q_body" >+ }, >+ { >+ "$ref": "../parameters.json#/q_header" >+ } >+ ], > "responses": { > "200": { > "description": "A list of cities", >@@ -63,23 +91,27 @@ > }, > "x-koha-authorization": { > "permissions": { >- "catalogue": "1" >+ "catalogue": "1" > } > } > }, > "post": { > "x-mojo-to": "Cities#add", > "operationId": "addCity", >- "tags": ["cities"], >- "parameters": [{ >- "name": "body", >- "in": "body", >- "description": "A JSON object containing informations about the new hold", >- "required": true, >- "schema": { >- "$ref": "../definitions.json#/city" >+ "tags": [ >+ "cities" >+ ], >+ "parameters": [ >+ { >+ "name": "body", >+ "in": "body", >+ "description": "A JSON object containing informations about the new hold", >+ "required": true, >+ "schema": { >+ "$ref": "../definitions.json#/city" >+ } > } >- }], >+ ], > "produces": [ > "application/json" > ], >@@ -126,10 +158,14 @@ > "get": { > "x-mojo-to": "Cities#get", > "operationId": "getCity", >- "tags": ["cities"], >- "parameters": [{ >- "$ref": "../parameters.json#/city_id_pp" >- }], >+ "tags": [ >+ "cities" >+ ], >+ "parameters": [ >+ { >+ "$ref": "../parameters.json#/city_id_pp" >+ } >+ ], > "produces": [ > "application/json" > ], >@@ -161,25 +197,30 @@ > }, > "x-koha-authorization": { > "permissions": { >- "catalogue": "1" >+ "catalogue": "1" > } > } > }, > "put": { > "x-mojo-to": "Cities#update", > "operationId": "updateCity", >- "tags": ["cities"], >- "parameters": [{ >- "$ref": "../parameters.json#/city_id_pp" >- }, { >- "name": "body", >- "in": "body", >- "description": "A city object", >- "required": true, >- "schema": { >- "$ref": "../definitions.json#/city" >+ "tags": [ >+ "cities" >+ ], >+ "parameters": [ >+ { >+ "$ref": "../parameters.json#/city_id_pp" >+ }, >+ { >+ "name": "body", >+ "in": "body", >+ "description": "A city object", >+ "required": true, >+ "schema": { >+ "$ref": "../definitions.json#/city" >+ } > } >- }], >+ ], > "produces": [ > "application/json" > ], >@@ -230,10 +271,14 @@ > "delete": { > "x-mojo-to": "Cities#delete", > "operationId": "deleteCity", >- "tags": ["cities"], >- "parameters": [{ >- "$ref": "../parameters.json#/city_id_pp" >- }], >+ "tags": [ >+ "cities" >+ ], >+ "parameters": [ >+ { >+ "$ref": "../parameters.json#/city_id_pp" >+ } >+ ], > "produces": [ > "application/json" > ], >-- >2.24.2 (Apple Git-127)
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 25279
:
103693
|
103694
|
103802
|
103803
|
103804
|
104065
|
104072
|
104359
|
104387
|
104416
|
104417
|
104420
|
104421
|
104423
|
104427
|
104428
|
104429
|
104430
|
104431
|
104432
|
104433
|
104434
|
104435
|
104510