[koha-commits] main Koha release repository branch master updated. v16.05.00-560-g53631f9
Git repo owner
gitmaster at git.koha-community.org
Fri Aug 26 15:08:54 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, master has been updated
via 53631f9ffdc86c1afbcc3108ac3ddf1f73fef40e (commit)
via eeab7d0666677e3bb7ec4e56bcb5a7164aeab48e (commit)
via 7b8c7b038f4e40b53bcc861a3f265691a2ccb74d (commit)
via c523c1e0563a51087d901cbeed0cd93c839fc9cb (commit)
via 55a8389bb3ad28151b0eaeaa3d0d2ff32ad09c24 (commit)
via 2aa333fb5fefe3f5fb2eca7bdb435b12cb6ab4cc (commit)
via baaeb725d2fced741c84efedb506ab54df3a7f97 (commit)
via 0eaf72ab26457929a8485e5f3dc183452300794b (commit)
from d368059fd5f25a1b1946d0bb6ce4b87d8ebe6691 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 53631f9ffdc86c1afbcc3108ac3ddf1f73fef40e
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date: Thu Aug 25 14:52:47 2016 -0300
Bug 16699: (QA followup) Move minified swagger file into the swagger/ dir
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit eeab7d0666677e3bb7ec4e56bcb5a7164aeab48e
Author: Lari Taskula <larit at student.uef.fi>
Date: Thu Aug 11 15:51:38 2016 +0300
Bug 16699: Remove requirement from borrowernumberQueryParam
borrowernumberQueryParam shouldn't be required as also changed in Bug 16271.
To test:
1. Don't apply the patch yet, but first minify Swagger and run
t/db_dependent/api/v1/holds.t
2. Observe that some tests fail with response code 400 when expecting 200.
3. Apply patch and minify Swagger
4. Run t/db_dependent/api/v1/holds.t
5. Observe that tests pass.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 7b8c7b038f4e40b53bcc861a3f265691a2ccb74d
Author: Lari Taskula <larit at student.uef.fi>
Date: Tue Jun 14 17:27:36 2016 +0300
Bug 16699: Move Swagger-related files to api/v1/swagger
This patch separates Swagger-specifications and the minifySwagger.pl from other
api-files by moving specifications & minifier into api/v1/swagger.
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi>
My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.
Signed-off-by: Johanna Raisa <johanna.raisa at gmail.com>
My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit c523c1e0563a51087d901cbeed0cd93c839fc9cb
Author: Lari Taskula <larit at student.uef.fi>
Date: Tue Jun 14 14:24:42 2016 +0300
Bug 16699: Reference new x-primitives in currently defined objects
Since we have defined some basic x-primitives in x-primitives.json, we can now
start to reuse them in our currently defined objects.
To test:
1. Apply patch
2. Run minifySwagger.pl
3. Validate your Swagger specifications
4. Observe that validation passes
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi>
My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.
Signed-off-by: Johanna Raisa <johanna.raisa at gmail.com>
My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 55a8389bb3ad28151b0eaeaa3d0d2ff32ad09c24
Author: Lari Taskula <larit at student.uef.fi>
Date: Tue Jun 14 12:53:58 2016 +0300
Bug 16699: Support multiple types in primitive definitions
Currently it is not possible to define multiple types for primitive definitions
in /definitions/*. If you try to use the following
"firstname": {
"type": ["string", "null"],
"description": "patron's first name"
}
in definitions.json, online.swagger.io validator will not validate it:
{"messages":["attribute definitions.firstname.type is not of type `string`"]}
One way to get around this issue is to extend definitions with custom
"x-primitives" object, where we will define all reusable primitive definitions.
To test:
1. Add the "firstname" example above to definitions.json
2. Run minifySwagger.pl
3. Validate your specification
4. Observe that error with description mentioned above is given
5. Apply patch
6. Repeat step 2 and 3
7. Observe that validation passes
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi>
My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.
Signed-off-by: Johanna Raisa <johanna.raisa at gmail.com>
My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 2aa333fb5fefe3f5fb2eca7bdb435b12cb6ab4cc
Author: Lari Taskula <larit at student.uef.fi>
Date: Fri Jun 10 17:25:40 2016 +0300
Bug 16699: Fix mixed-up indentation from 2-4 spaces to 2 spaces
These definitions had indentation of 4 spaces, while rest of the specification
uses 2 spaces. This patch simply maintains the consistency in indentations and
provides no other modifications to code.
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi>
My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.
Signed-off-by: Johanna Raisa <johanna.raisa at gmail.com>
My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit baaeb725d2fced741c84efedb506ab54df3a7f97
Author: Lari Taskula <larit at student.uef.fi>
Date: Fri Jun 10 16:52:54 2016 +0300
Bug 16699: Add borrowernumberQueryParam for reusability
The borrowernumber as a query parameter should be defined in parameters.json
in order to allow its reusability.
To test:
1. Apply patch
2. Run minifySwagger.pl
3. Validate swagger.min.json in online.swagger.io/validator/debug?url=url_to+
_your_swagger_min_json or your local swagger-api/validator-badge validator
4. Observe that validation passes
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi>
My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.
Signed-off-by: Johanna Raisa <johanna.raisa at gmail.com>
My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 0eaf72ab26457929a8485e5f3dc183452300794b
Author: Lari Taskula <larit at student.uef.fi>
Date: Thu Jun 9 16:13:53 2016 +0300
Bug 16699: Split parameters and paths in Swagger
Parameters and paths should be split in our Swagger specification, because
otherwise swagger.json would become messy with all the paths and their
further specification in the same file. Also parameters should be split
for the same reason.
Instead of using index.json for definitions, parameters and paths, we define
new files "definitions.json", "parameters.json" and "paths.json" in order to
simplify the references. If we kept using index.json and try to reference
"/definitions/error.json" from "/paths/holds.json", reference would be
"../definitions/index.json#/error" instead of now simplified version,
"../definitions.json#/error".
Here is the proposed structure:
.
├── swagger.json
├── definitions.json
├── paths.json
├── parameters.json
├── definitions
│ └── error.json
│ └── patron.json
├── parameters
│ └── patron.json
├── paths
│ └── patrons.json
├── minifySwagger.pl
└── swagger.min.js
The swagger.json paths, definitions and parameters will look as follows:
...
"paths": {
"$ref": "paths.json"
},
"definitions": {
"$ref": "definitions.json"
},
"parameters": {
"$ref": "parameters.json"
}
...
A problem with splitting specification into multiple files directly from
swagger.json (e.g. "paths": { "$ref": "paths.json" }) is that it is not
following the Swagger specification and an error will be thrown by the
Swagger-UI default validator (online.swagger.io/validator).
To overcome this problem, we use the minifySwagger.pl script from Buug 16212.
This allows the developers to work with the structure introduced in this patch
thus allowing developers to split the specification nicely, and still have a
valid Swagger specification in the minified swagger.min.json.
To test:
-2: Apply the minifier-patch in Buug 16212.
-1: Make sure you can validate your specification with Swagger2 validator at
online.swagger.io/validator/debug?url=url_to_swaggerjson, or install it
locally from https://github.com/swagger-api/validator-badge.
1. Don't apply this patch yet, but first validate swagger.json
with swagger.io-validator (or your local version, if you installed it)
2. Observe that validation errors are given
3. Run minifySwagger.pl
4. Validate swagger.min.json with the validator you used in step 1
5. Observe that validation passes and we overcame the invalid specification
problem in swagger.min.json
6. Apply this patch
7. Run minifySwagger.pl
8. Repeat step 4
9. Observe that validation passes with new structure
10. Run REST tests at t/db_dependents/api/v1
(11. Study the new structure of our Swagger specifications :))
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi>
My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.
Signed-off-by: Johanna Raisa <johanna.raisa at gmail.com>
My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
-----------------------------------------------------------------------
Summary of changes:
Koha/REST/V1.pm | 2 +-
api/v1/definitions/hold.json | 67 -----
api/v1/definitions/holds.json | 4 -
api/v1/definitions/index.json | 6 -
api/v1/definitions/patron.json | 281 ---------------------
api/v1/swagger.json | 356 ---------------------------
api/v1/swagger/definitions.json | 14 ++
api/v1/{ => swagger}/definitions/error.json | 0
api/v1/swagger/definitions/hold.json | 63 +++++
api/v1/swagger/definitions/holds.json | 6 +
api/v1/swagger/definitions/patron.json | 274 +++++++++++++++++++++
api/v1/swagger/parameters.json | 11 +
api/v1/swagger/parameters/hold.json | 9 +
api/v1/swagger/parameters/patron.json | 15 ++
api/v1/swagger/paths.json | 14 ++
api/v1/swagger/paths/holds.json | 280 +++++++++++++++++++++
api/v1/swagger/paths/patrons.json | 61 +++++
api/v1/swagger/swagger.json | 28 +++
api/v1/{ => swagger}/swagger.min.json | 0
api/v1/swagger/x-primitives.json | 41 +++
20 files changed, 817 insertions(+), 715 deletions(-)
delete mode 100644 api/v1/definitions/hold.json
delete mode 100644 api/v1/definitions/holds.json
delete mode 100644 api/v1/definitions/index.json
delete mode 100644 api/v1/definitions/patron.json
delete mode 100644 api/v1/swagger.json
create mode 100644 api/v1/swagger/definitions.json
rename api/v1/{ => swagger}/definitions/error.json (100%)
create mode 100644 api/v1/swagger/definitions/hold.json
create mode 100644 api/v1/swagger/definitions/holds.json
create mode 100644 api/v1/swagger/definitions/patron.json
create mode 100644 api/v1/swagger/parameters.json
create mode 100644 api/v1/swagger/parameters/hold.json
create mode 100644 api/v1/swagger/parameters/patron.json
create mode 100644 api/v1/swagger/paths.json
create mode 100644 api/v1/swagger/paths/holds.json
create mode 100644 api/v1/swagger/paths/patrons.json
create mode 100644 api/v1/swagger/swagger.json
rename api/v1/{ => swagger}/swagger.min.json (100%)
create mode 100644 api/v1/swagger/x-primitives.json
hooks/post-receive
--
main Koha release repository
More information about the koha-commits
mailing list