From 3fa85c863e3cc2ccfc1f5f763bf9fea06b469ea7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 17 May 2021 16:07:17 +0200 Subject: [PATCH] Bug 28189: Fix PluginRoutes.t So, this one was hidden. The failures were: # Failed test 'Bad plugins raise warning' # at t/db_dependent/Koha/REST/Plugin/PluginRoutes.t line 75. # found warning: Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x556972b22da0): # found warning: Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x5569735b8368): # expected to find warning: (?^u:Could not load REST API spec bundle: Invalid JSON specification) # expected to find warning: (?^u:The resulting spec is invalid. Skipping Bad API Route Plugin) And the correct error was (after a debug warn in JSON::Validator): Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x55fd0c3d3160): - /info/version: Expected string - got number. at /usr/share/perl5/JSON/Validator.pm line 165. So this patch fixes it, but I don't understand why it's only failing for plugin routes however. --- api/v1/swagger/swagger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/swagger/swagger.yaml b/api/v1/swagger/swagger.yaml index aa666819440..bb246f8eb36 100644 --- a/api/v1/swagger/swagger.yaml +++ b/api/v1/swagger/swagger.yaml @@ -11,7 +11,7 @@ x-primitives: $ref: x-primitives.json info: title: Koha REST API - version: 1 + version: "1" license: name: GPL v3, url: http://www.gnu.org/licenses/gpl.txt -- 2.20.1