Koha/api/v1/swagger/definitions/library.json
Tomas Cohen Arazi 0718416ff1 Bug 16497: (follow-up) Adapt to existing guidelines and RFC
This patch makes the original implementation match what is specified on
the RFC [1].

The controller is updated, and so the tests.

To test:
- Apply this patches:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/libraries.t
=> SUCCESS: Tests pass!

[1] https://wiki.koha-community.org/wiki/Libraries_endpoint_RFC

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-19 13:52:14 +00:00

90 lines
2.6 KiB
JSON

{
"type": "object",
"properties": {
"library_id": {
"$ref": "../x-primitives.json#/library_id"
},
"name": {
"type": "string",
"description": "Printable name of library"
},
"address1": {
"type": ["string", "null"],
"description": "the first address line of the library"
},
"address2": {
"type": ["string", "null"],
"description": "the second address line of the library"
},
"address3": {
"type": ["string", "null"],
"description": "the third address line of the library"
},
"postal_code": {
"type": ["string", "null"],
"description": "the postal code of the library"
},
"city": {
"type": ["string", "null"],
"description": "the city or province of the library"
},
"state": {
"type": ["string", "null"],
"description": "the reqional state of the library"
},
"country": {
"type": ["string", "null"],
"description": "the county of the library"
},
"phone": {
"type": ["string", "null"],
"description": "the primary phone of the library"
},
"fax": {
"type": ["string", "null"],
"description": "the fax number of the library"
},
"email": {
"type": ["string", "null"],
"description": "the primary email address of the library"
},
"reply_to_email": {
"type": ["string", "null"],
"description": "the email to be used as a Reply-To"
},
"return_path_email": {
"type": ["string", "null"],
"description": "the email to be used as Return-Path"
},
"url": {
"type": ["string", "null"],
"description": "the URL for your library or branch's website"
},
"ip": {
"type": ["string", "null"],
"description": "the IP address for your library or branch"
},
"notes": {
"type": ["string", "null"],
"description": "notes related to your library or branch"
},
"opac_info": {
"type": ["string", "null"],
"description": "HTML that displays in OPAC"
},
"geolocation": {
"type": ["string", "null"],
"description": "geolocation of your library"
},
"marc_org_code": {
"type": [ "string", "null" ],
"description": "MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode"
},
"pickup_location": {
"type": "boolean",
"description": "If the library can act as a pickup location"
}
},
"additionalProperties": false,
"required": ["library_id", "name"]
}