https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36722

            Bug ID: 36722
           Summary: REST API won't work if json-schema.org is down
 Change sponsored?: ---
           Product: Koha
           Version: 22.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: REST API
          Assignee: koha-bugs@lists.koha-community.org
          Reporter: dc...@prosentient.com.au
                CC: tomasco...@gmail.com

This is arguably the same issue as bug 23653 except that it's a different
website this time.

Also, Koha won't crash if json-schema.org is down, but the API will return a
404 for all endpoints.

Like bug 23653, I think that we should use a local copy of the specification.

At the moment, the way to do that is to download
http://json-schema.org/draft-04/schema#, save it into our source tree, and then
run the following:

my $schema = JSON::Validator::Schema::OpenAPIv2->new;
$schema->specification($saved_schema_spec);

In theory, that's it. 

I'll look at providing a patch shortly...

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to