From 7b8c7b038f4e40b53bcc861a3f265691a2ccb74d Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Tue, 14 Jun 2016 17:27:36 +0300 Subject: [PATCH] Bug 16699: Move Swagger-related files to api/v1/swagger MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch separates Swagger-specifications and the minifySwagger.pl from other api-files by moving specifications & minifier into api/v1/swagger. Signed-off-by: Olli-Antti Kivilahti 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 My name is Johanna Räisä and I approve this commit. We have been using Swagger2.0-driven REST API in production successfully. Signed-off-by: Benjamin Rokseth Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall --- Koha/REST/V1.pm | 2 +- 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}/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 14 files changed, 1 insertion(+), 1 deletion(-) 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}/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 f97884ef00..33ee9ccc24 100644 --- a/Koha/REST/V1.pm +++ b/Koha/REST/V1.pm @@ -55,7 +55,7 @@ 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"), }); } 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/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 -- 2.39.5