From f862f78588b032c6d59eae3eb4b0d30ae33ac787 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 1 May 2024 09:16:21 +0100 Subject: [PATCH] Bug 36546: (follow-up) Add fallback to unbundled spec Some developers are running without ktd still and as such may not want to install the node modules required to bundle the specification. This patch adds a fallback to the unbundled yaml files when the bundle.json file isn't found. Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- Koha/REST/V1.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm index 66bae63d73..52bd15697e 100644 --- a/Koha/REST/V1.pm +++ b/Koha/REST/V1.pm @@ -76,6 +76,9 @@ sub startup { } my $spec_file = $self->home->rel_file("api/v1/swagger/swagger_bundle.json"); + if (!-f $spec_file) { + $spec_file = $self->home->rel_file("api/v1/swagger/swagger.yaml"); + } push @{$self->routes->namespaces}, 'Koha::Plugin'; -- 2.39.2