Tomas Cohen Arazi
dfbadc70d4
This patch implements the changes required by the cities endpoint RFC [1]. It uses the objects.search helper, and relies on bug 19686. To test: - Apply the patches - Compare the spec with the RFC (api/v1/swagger/definitions/city.json) => SUCCESS: It makes sense - Run: $ kshell k$ prove t/db_dependent/api/v1/cities.t => Tests pass! - Sign off :-D Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
26 lines
571 B
JSON
26 lines
571 B
JSON
{
|
|
"type": "object",
|
|
"properties": {
|
|
"city_id": {
|
|
"$ref": "../x-primitives.json#/city_id"
|
|
},
|
|
"name": {
|
|
"description": "city name",
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"description": "city state",
|
|
"type": ["string", "null"]
|
|
},
|
|
"postal_code": {
|
|
"description": "city postal code",
|
|
"type": ["string", "null"]
|
|
},
|
|
"country": {
|
|
"description": "city country",
|
|
"type": ["string", "null"]
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["name", "state", "postal_code", "country"]
|
|
}
|