Bugzilla – Attachment 52975 Details for
Bug 16699
Swagger: Split parameters and paths, and specify required permissions for resource
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 16699: Add borrowernumberQueryParam for reusability
SIGNED-OFF-Bug-16699-Add-borrowernumberQueryParam-.patch (text/plain), 3.04 KB, created by
Johanna Räisä
on 2016-06-30 13:34:11 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 16699: Add borrowernumberQueryParam for reusability
Filename:
MIME Type:
Creator:
Johanna Räisä
Created:
2016-06-30 13:34:11 UTC
Size:
3.04 KB
patch
obsolete
>From e5a17064ecfa08dca0afe49d9d79be7ba6bbf753 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <larit@student.uef.fi> >Date: Fri, 10 Jun 2016 16:52:54 +0300 >Subject: [PATCH] [SIGNED-OFF] Bug 16699: Add borrowernumberQueryParam for > reusability >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The borrowernumber as a query parameter should be defined in parameters.json >in order to allow its reusability. > >To test: >1. Apply patch >2. Run minifySwagger.pl >3. Validate swagger.min.json in online.swagger.io/validator/debug?url=url_to+ > _your_swagger_min_json or your local swagger-api/validator-badge validator >4. Observe that validation passes > >Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> > >My name is Olli-Antti Kivilahti and I approve this commit. >We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now >in production and I am certain we have a pretty good idea on how to work with >the limitations of Swagger2.0 >We participated in the development of the Mojolicious::Plugin::Swagger and know >it well. We have made an extension to the plugin to provide full CORS support >and have been building all our in-house features on the new REST API. > >Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> > >My name is Johanna Räisä and I approve this commit. >We have been using Swagger2.0-driven REST API in production successfully. >--- > api/v1/parameters.json | 3 +++ > api/v1/parameters/patron.json | 7 +++++++ > api/v1/paths/holds.json | 6 +----- > 3 files changed, 11 insertions(+), 5 deletions(-) > >diff --git a/api/v1/parameters.json b/api/v1/parameters.json >index 9778ac7..b20e19f 100644 >--- a/api/v1/parameters.json >+++ b/api/v1/parameters.json >@@ -2,6 +2,9 @@ > "borrowernumberPathParam": { > "$ref": "parameters/patron.json#/borrowernumberPathParam" > }, >+ "borrowernumberQueryParam": { >+ "$ref": "parameters/patron.json#/borrowernumberQueryParam" >+ }, > "holdIdPathParam": { > "$ref": "parameters/hold.json#/holdIdPathParam" > } >diff --git a/api/v1/parameters/patron.json b/api/v1/parameters/patron.json >index 285ee04..2b204c1 100644 >--- a/api/v1/parameters/patron.json >+++ b/api/v1/parameters/patron.json >@@ -5,5 +5,12 @@ > "description": "Internal patron identifier", > "required": true, > "type": "integer" >+ }, >+ "borrowernumberQueryParam": { >+ "name": "borrowernumber", >+ "in": "query", >+ "description": "Internal borrower identifier", >+ "required": true, >+ "type": "integer" > } > } >diff --git a/api/v1/paths/holds.json b/api/v1/paths/holds.json >index 06c9af5..770565a 100644 >--- a/api/v1/paths/holds.json >+++ b/api/v1/paths/holds.json >@@ -4,11 +4,7 @@ > "operationId": "listHolds", > "tags": ["borrowers", "holds"], > "parameters": [{ >- "name": "borrowernumber", >- "in": "query", >- "description": "Internal borrower identifier", >- "required": true, >- "type": "integer" >+ "$ref": "../parameters.json#/borrowernumberQueryParam" > } > ], > "produces": ["application/json"], >-- >1.9.1
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 16699
:
52375
|
52376
|
52377
|
52378
|
52379
|
52380
|
52580
|
52581
|
52956
|
52957
|
52958
|
52959
|
52960
|
52961
|
52962
|
52974
|
52975
|
52976
|
52978
|
52979
|
52980
|
52986
|
52987
|
52988
|
52989
|
52990
|
52991
|
54299
|
54300
|
54301
|
54302
|
54303
|
54304
|
54311
|
54372
|
54884
|
54885
|
54886
|
54887
|
54888
|
54889
|
54890
|
54891
|
54892