Bugzilla – Attachment 52580 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: Move Swagger-related files to api/v1/swagger
Bug-16699-Move-Swagger-related-files-to-apiv1swagg.patch (text/plain), 5.65 KB, created by
Lari Taskula
on 2016-06-20 12:37:44 UTC
(
hide
)
Description:
Bug 16699: Move Swagger-related files to api/v1/swagger
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2016-06-20 12:37:44 UTC
Size:
5.65 KB
patch
obsolete
>From 12e34265906c75eab71d6009488ac1d4e6def937 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <larit@student.uef.fi> >Date: Tue, 14 Jun 2016 17:27:36 +0300 >Subject: [PATCH] Bug 16699: Move Swagger-related files to api/v1/swagger > >This patch separates Swagger-specifications and the minifySwagger.pl from other >api-files by moving specifications & minifier into api/v1/swagger. >--- > Koha/REST/V1.pm | 4 ++-- > api/v1/{ => swagger}/definitions.json | 0 > api/v1/{ => swagger}/definitions/error.json | 0 > api/v1/{ => swagger}/definitions/hold.json | 0 > api/v1/{ => swagger}/definitions/holds.json | 0 > api/v1/{ => swagger}/definitions/patron.json | 0 > api/v1/{ => swagger}/minifySwagger.pl | 0 > api/v1/{ => swagger}/parameters.json | 0 > api/v1/{ => swagger}/parameters/hold.json | 0 > api/v1/{ => swagger}/parameters/patron.json | 0 > api/v1/{ => swagger}/paths.json | 0 > api/v1/{ => swagger}/paths/holds.json | 0 > api/v1/{ => swagger}/paths/patrons.json | 0 > api/v1/{ => swagger}/swagger.json | 0 > api/v1/{ => swagger}/x-primitives.json | 0 > t/api/v1/minifier.t | 2 +- > 16 files changed, 3 insertions(+), 3 deletions(-) > rename api/v1/{ => swagger}/definitions.json (100%) > rename api/v1/{ => swagger}/definitions/error.json (100%) > rename api/v1/{ => swagger}/definitions/hold.json (100%) > rename api/v1/{ => swagger}/definitions/holds.json (100%) > rename api/v1/{ => swagger}/definitions/patron.json (100%) > rename api/v1/{ => swagger}/minifySwagger.pl (100%) > rename api/v1/{ => swagger}/parameters.json (100%) > rename api/v1/{ => swagger}/parameters/hold.json (100%) > rename api/v1/{ => swagger}/parameters/patron.json (100%) > rename api/v1/{ => swagger}/paths.json (100%) > rename api/v1/{ => swagger}/paths/holds.json (100%) > rename api/v1/{ => swagger}/paths/patrons.json (100%) > rename api/v1/{ => swagger}/swagger.json (100%) > rename api/v1/{ => swagger}/x-primitives.json (100%) > >diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm >index b1b4954..1dc7917 100644 >--- a/Koha/REST/V1.pm >+++ b/Koha/REST/V1.pm >@@ -52,14 +52,14 @@ sub startup { > > $self->plugin(Swagger2 => { > route => $route, >- url => $self->home->rel_file("api/v1/swagger.min.json"), >+ url => $self->home->rel_file("api/v1/swagger/swagger.min.json"), > }); > } > > sub minifySwagger { > my ($self, $swaggerPath) = @_; > >- $swaggerPath = C4::Context->config("intranetdir").'/api/v1/' unless $swaggerPath; >+ $swaggerPath = C4::Context->config("intranetdir").'/api/v1/swagger/' unless $swaggerPath; > my $pathToMinifier = $swaggerPath.'minifySwagger.pl'; > my $pathToSwaggerJson = $swaggerPath.'swagger.json'; > my $pathToSwaggerMinJson = $swaggerPath.'swagger.min.json'; >diff --git a/api/v1/definitions.json b/api/v1/swagger/definitions.json >similarity index 100% >rename from api/v1/definitions.json >rename to api/v1/swagger/definitions.json >diff --git a/api/v1/definitions/error.json b/api/v1/swagger/definitions/error.json >similarity index 100% >rename from api/v1/definitions/error.json >rename to api/v1/swagger/definitions/error.json >diff --git a/api/v1/definitions/hold.json b/api/v1/swagger/definitions/hold.json >similarity index 100% >rename from api/v1/definitions/hold.json >rename to api/v1/swagger/definitions/hold.json >diff --git a/api/v1/definitions/holds.json b/api/v1/swagger/definitions/holds.json >similarity index 100% >rename from api/v1/definitions/holds.json >rename to api/v1/swagger/definitions/holds.json >diff --git a/api/v1/definitions/patron.json b/api/v1/swagger/definitions/patron.json >similarity index 100% >rename from api/v1/definitions/patron.json >rename to api/v1/swagger/definitions/patron.json >diff --git a/api/v1/minifySwagger.pl b/api/v1/swagger/minifySwagger.pl >similarity index 100% >rename from api/v1/minifySwagger.pl >rename to api/v1/swagger/minifySwagger.pl >diff --git a/api/v1/parameters.json b/api/v1/swagger/parameters.json >similarity index 100% >rename from api/v1/parameters.json >rename to api/v1/swagger/parameters.json >diff --git a/api/v1/parameters/hold.json b/api/v1/swagger/parameters/hold.json >similarity index 100% >rename from api/v1/parameters/hold.json >rename to api/v1/swagger/parameters/hold.json >diff --git a/api/v1/parameters/patron.json b/api/v1/swagger/parameters/patron.json >similarity index 100% >rename from api/v1/parameters/patron.json >rename to api/v1/swagger/parameters/patron.json >diff --git a/api/v1/paths.json b/api/v1/swagger/paths.json >similarity index 100% >rename from api/v1/paths.json >rename to api/v1/swagger/paths.json >diff --git a/api/v1/paths/holds.json b/api/v1/swagger/paths/holds.json >similarity index 100% >rename from api/v1/paths/holds.json >rename to api/v1/swagger/paths/holds.json >diff --git a/api/v1/paths/patrons.json b/api/v1/swagger/paths/patrons.json >similarity index 100% >rename from api/v1/paths/patrons.json >rename to api/v1/swagger/paths/patrons.json >diff --git a/api/v1/swagger.json b/api/v1/swagger/swagger.json >similarity index 100% >rename from api/v1/swagger.json >rename to api/v1/swagger/swagger.json >diff --git a/api/v1/x-primitives.json b/api/v1/swagger/x-primitives.json >similarity index 100% >rename from api/v1/x-primitives.json >rename to api/v1/swagger/x-primitives.json >diff --git a/t/api/v1/minifier.t b/t/api/v1/minifier.t >index 8992a72..de1ac48 100644 >--- a/t/api/v1/minifier.t >+++ b/t/api/v1/minifier.t >@@ -57,7 +57,7 @@ qq ({ > }); > > # Path containing actual swagger specification files >-my $real_swaggerPath = C4::Context->config("intranetdir").'/api/v1/'; >+my $real_swaggerPath = C4::Context->config("intranetdir").'/api/v1/swagger'; > > # Create a tmp directory where we can modify swagger.json > my $swaggerPath = File::Temp->newdir()."/"; >-- >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