@@ -, +, @@ --- Koha/REST/V1.pm | 2 +- api/v1/swagger/swagger.json | 28 ---------------------------- api/v1/swagger/swagger.yaml | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 29 deletions(-) delete mode 100644 api/v1/swagger/swagger.json create mode 100644 api/v1/swagger/swagger.yaml --- a/Koha/REST/V1.pm +++ a/Koha/REST/V1.pm @@ -79,7 +79,7 @@ sub startup { $spec = $validator->bundle( { replace => 1, - schema => $self->home->rel_file("api/v1/swagger/swagger.json") + schema => $self->home->rel_file("api/v1/swagger/swagger.yaml") } ); --- a/api/v1/swagger/swagger.json +++ a/api/v1/swagger/swagger.json @@ -1,28 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Koha REST API", - "version": "1", - "license": { - "name": "GPL v3", - "url": "http://www.gnu.org/licenses/gpl.txt" - }, - "contact": { - "name": "Koha Development Team", - "url": "https://koha-community.org/" - } - }, - "basePath": "/api/v1", - "paths": { - "$ref": "paths.json" - }, - "definitions": { - "$ref": "definitions.json" - }, - "parameters": { - "$ref": "parameters.json" - }, - "x-primitives": { - "$ref": "x-primitives.json" - } -} --- a/api/v1/swagger/swagger.yaml +++ a/api/v1/swagger/swagger.yaml @@ -0,0 +1,32 @@ +--- +swagger: 2.0 +basePath: /api/v1 +paths: + $ref: paths.json +definitions: + $ref: definitions.json +parameters: + $ref: parameters.json +x-primitives: + $ref: x-primitives.json +info: + title: Koha REST API + version: 1 + license: + name: GPL v3, + url: http://www.gnu.org/licenses/gpl.txt + contact: + name: Koha Development Team + url: https://koha-community.org/ + description: | + ## Introduction + + This API is documented in **OpenAPI format**. + + ## Special headers + + ### x-koha-library + + This optional header should be passed to give your api request a library + context; If it is not included in the request, then the request context + will default to using your api comsumer's assigned home library. --