View | Details | Raw Unified | Return to bug 13799
Collapse All | Expand All

(-)a/Koha/REST.pm (-2 / +2 lines)
Lines 1-4 Link Here
1
package Koha::REST;
1
package Koha::REST::V1;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Mojo::Base 'Mojolicious';
4
use Mojo::Base 'Mojolicious';
Lines 18-24 sub startup { Link Here
18
18
19
    $self->plugin(Swagger2 => {
19
    $self->plugin(Swagger2 => {
20
        route => $route,
20
        route => $route,
21
        url => $self->home->rel_file("rest.json"),
21
        url => $self->home->rel_file("Koha/REST/V1.swagger"),
22
    });
22
    });
23
}
23
}
24
24
(-)a/rest.json (-3 / +3 lines)
Lines 2-8 Link Here
2
  "swagger": "2.0",
2
  "swagger": "2.0",
3
  "info": {
3
  "info": {
4
    "title": "Koha REST API",
4
    "title": "Koha REST API",
5
    "version": "0.1",
5
    "version": "1",
6
    "license": {
6
    "license": {
7
      "name": "GPL v3",
7
      "name": "GPL v3",
8
      "url": "http://www.gnu.org/licenses/gpl.txt"
8
      "url": "http://www.gnu.org/licenses/gpl.txt"
Lines 16-22 Link Here
16
  "paths": {
16
  "paths": {
17
    "/borrowers": {
17
    "/borrowers": {
18
      "get": {
18
      "get": {
19
        "x-mojo-controller": "Koha::REST::Borrowers",
19
        "x-mojo-controller": "Koha::REST::V1::Borrowers",
20
        "operationId": "listBorrowers",
20
        "operationId": "listBorrowers",
21
        "produces": [
21
        "produces": [
22
          "application/json"
22
          "application/json"
Lines 36-42 Link Here
36
    },
36
    },
37
    "/borrowers/{borrowernumber}": {
37
    "/borrowers/{borrowernumber}": {
38
      "get": {
38
      "get": {
39
        "x-mojo-controller": "Koha::REST::Borrowers",
39
        "x-mojo-controller": "Koha::REST::V1::Borrowers",
40
        "operationId": "getBorrower",
40
        "operationId": "getBorrower",
41
        "parameters": [
41
        "parameters": [
42
          {
42
          {
(-)a/Koha/REST/Borrowers.pm (-1 / +1 lines)
Lines 1-4 Link Here
1
package Koha::REST::Borrowers;
1
package Koha::REST::V1::Borrowers;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
(-)a/rest (-2 / +1 lines)
Lines 3-6 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
require Mojolicious::Commands;
5
require Mojolicious::Commands;
6
Mojolicious::Commands->start_app('Koha::REST');
6
Mojolicious::Commands->start_app('Koha::REST::V1');
7
- 

Return to bug 13799