[Koha-devel] Help! Plugin's API endpoint validation failing only on customer server
Michael Hafen (TECH)
michael.hafen at washk12.org
Thu Sep 9 18:13:12 CEST 2021
Have you looked at opac/svc/overdrive_proxy ? It doesn't do a POST, but it
does do some external api calls.
On Thu, Sep 9, 2021 at 8:52 AM Isherwood, Andrew <
andrew.isherwood at ptfs-europe.com> wrote:
> Hi
>
> I've been banging my head against this one for a few hours now, so I'm
> hoping someone can help!
>
> I've developed a Koha ILL backend for RapidILL for a customer. Part of
> the development was to create a plugin that provides Koha Rest API
> endpoints that effectively proxies to the RapidILL SOAP API.
> Everything works perfectly on my development server running
> koha-testing-docker
>
> However, on the customer's Koha instance, all API calls to the plugin
> fail validation with the following error:
>
> {
> "errors": [
> {
> "message": "Expected object - got null.",
> "path": "/body"
> }
> ],
> "status": 400
> }
>
> I'm pretty confident that my plugin and the requests I'm making to it
> are correct since everything works perfectly on my dev server, however
> the API spec is here
>
> https://github.com/PTFS-Europe/koha-plugin-rapidill/blob/main/Koha/Plugin/Com/PTFSEurope/RapidILL/openapi.json
>
> and a sample request body is:
>
> {
> "requestId": "17900139",
> "updateAction": "Cancel",
> "metadata": {
> "UpdateComment": "TEST PLEASE CANCEL REQUEST"
> }
> }
>
> The most annoying thing is that I've had this problem a few times
> before in the past and it's always come down to module dependency
> versions, though this time, I'm not sure this is the problem. I've
> aligned versions of the following modules on the customer's server to
> match the versions on my koha-testing-docker, these have been the
> problematic modules in the past. But still no luck:
>
> JSON - 2.90
> JSON::Validator - 3.14
> Mojolicious - 8.12
> Mojolicious::Plugin::OpenAPI - 2.16
>
> In an attempt to narrow it down, I've been trying to find somewhere
> else in Koha where a POST API call is made, but haven't found one, any
> idea?
>
> Does anyone have any suggestions where else I could try?
>
> Many thanks
> Andrew
> -------------------------------
> Andrew Isherwood
> Senior Software Engineer
>
> Email: andrew.isherwood at ptfs-europe.com
> www.ptfs-europe.com
>
> Registered in the United Kingdom No. 06416372 VAT Reg No. 925 7211 30
> The information contained in this email message may be privileged,
> confidential and protected from disclosure. If you are not the
> intended recipient, any dissemination, distribution or copying is
> strictly prohibited. If you think that you have received this email
> message in error, please email the sender at info at ptfs-europe.com
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : https://www.koha-community.org/
> git : https://git.koha-community.org/
> bugs : https://bugs.koha-community.org/
>
--
Michael Hafen
Washington County School District Technology Department
Systems Analyst
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210909/787d62d5/attachment.htm>
More information about the Koha-devel
mailing list