https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33503
Olli-Antti Kivilahti <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |olli-antti.kivilahti@hypern | |ova.fi Assignee|[email protected] |olli-antti.kivilahti@hypern |ity.org |ova.fi --- Comment #1 from Olli-Antti Kivilahti <[email protected]> --- Created attachment 149520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149520&action=edit Bug 33503 - Plugin OpenAPI2.0 specification schema fragments are not resolved. Merge full schema definitions. Bug 33503 - Plugin OpenAPI2.0 specification schema fragments are not resolved. Merge full schema definitions. Koha::REST::Plugin::PluginRoutes.pm simply injects a plugin's OpenAPI2.0 route definitions into the /paths -object. Possibly after Bug 30194, dereferencing OpenAPI2.0 schema fragments/components has started to fail. This plugin: https://github.com/Hypernova-Oy/koha-plugin-self-service/releases/tag/v1.0.11 used to get it's REST API paths injected and dereferenced/bundled correctly, for Koha versions 22.05 and before, but in the new Koha version the same schema definitions no longer work. This patch adds a new plugin hook, api_spec which injects a full OpenAPI2.0 compatible schema into the full Koha schema, avoiding to overwrite any existing definitions/parameters/info/paths/etc. This way we maintain backwards compatibility with existing plugins, which are not broken, and maintain updated plugins' ability to use complex schemas. We need to inject full schema definitions, because of the way how the new OpenAPI validator does dereferencing, by creating /parameters and /definitions -objects inside the plugin's OpenAPI schema object. The api_route()-plugin hook then proceeds to strip away only the paths/routes and loses the internal data structure references to the schema fragments/components. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] 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/
