Bugzilla – Attachment 52379 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]
Bug 16699: Reference new x-primitives in currently defined objects
Bug-16699-Reference-new-x-primitives-in-currently-.patch (text/plain), 3.70 KB, created by
Lari Taskula
on 2016-06-14 15:03:21 UTC
(
hide
)
Description:
Bug 16699: Reference new x-primitives in currently defined objects
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2016-06-14 15:03:21 UTC
Size:
3.70 KB
patch
obsolete
>From 5ab498577e98aad6b20187e282d1c5b6e7371d03 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <larit@student.uef.fi> >Date: Tue, 14 Jun 2016 14:24:42 +0300 >Subject: [PATCH] Bug 16699: Reference new x-primitives in currently defined > objects > >Since we have defined some basic x-primitives in x-primitives.json, we can now >start to reuse them in our currently defined objects. > >To test: >1. Apply patch >2. Run minifySwagger.pl >3. Validate your Swagger specifications >4. Observe that validation passes >--- > api/v1/definitions/hold.json | 14 +++++--------- > api/v1/definitions/patron.json | 21 +++++++-------------- > 2 files changed, 12 insertions(+), 23 deletions(-) > >diff --git a/api/v1/definitions/hold.json b/api/v1/definitions/hold.json >index d060810..dd08f3d 100644 >--- a/api/v1/definitions/hold.json >+++ b/api/v1/definitions/hold.json >@@ -2,22 +2,19 @@ > "type": "object", > "properties": { > "reserve_id": { >- "description": "Internal hold identifier" >+ "$ref": "../x-primitives.json#/reserve_id" > }, > "borrowernumber": { >- "type": "string", >- "description": "internally assigned user identifier" >+ "$ref": "../x-primitives.json#/borrowernumber" > }, > "reservedate": { > "description": "the date the hold was placed" > }, > "biblionumber": { >- "type": "string", >- "description": "internally assigned biblio identifier" >+ "$ref": "../x-primitives.json#/biblionumber" > }, > "branchcode": { >- "type": ["string", "null"], >- "description": "internally assigned branch identifier" >+ "$ref": "../x-primitives.json#/branchcode" > }, > "notificationdate": { > "description": "currently unused" >@@ -41,8 +38,7 @@ > "description": "date and time the hold was last updated" > }, > "itemnumber": { >- "type": ["string", "null"], >- "description": "internally assigned item identifier" >+ "$ref": "../x-primitives.json#/itemnumber" > }, > "waitingdate": { > "description": "the date the item was marked as waiting for the patron at the library" >diff --git a/api/v1/definitions/patron.json b/api/v1/definitions/patron.json >index c5d8ff6..ec46273 100644 >--- a/api/v1/definitions/patron.json >+++ b/api/v1/definitions/patron.json >@@ -2,20 +2,16 @@ > "type": "object", > "properties": { > "borrowernumber": { >- "type": "string", >- "description": "internally assigned user identifier" >+ "$ref": "../x-primitives.json#/borrowernumber" > }, > "cardnumber": { >- "type": ["string", "null"], >- "description": "library assigned user identifier" >+ "$ref": "../x-primitives.json#/cardnumber" > }, > "surname": { >- "type": "string", >- "description": "patron's last name" >+ "$ref": "../x-primitives.json#/surname" > }, > "firstname": { >- "type": ["string", "null"], >- "description": "patron's first name" >+ "$ref": "../x-primitives.json#/firstname" > }, > "title": { > "type": ["string", "null"], >@@ -62,12 +58,10 @@ > "description": "country of patron's primary address" > }, > "email": { >- "type": ["string", "null"], >- "description": "primary email address for patron's primary address" >+ "$ref": "../x-primitives.json#/email" > }, > "phone": { >- "type": ["string", "null"], >- "description": "primary phone number for patron's primary address" >+ "$ref": "../x-primitives.json#/phone" > }, > "mobile": { > "type": ["string", "null"], >@@ -130,8 +124,7 @@ > "description": "patron's date of birth" > }, > "branchcode": { >- "type": "string", >- "description": "code of patron's home branch" >+ "$ref": "../x-primitives.json#/branchcode" > }, > "categorycode": { > "type": "string", >-- >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