Ken'ichi Ohmichi | 4adae2f | 2017-03-15 15:47:44 -0700 | [diff] [blame] | 1 | # Copyright 2015 NEC Corporation. All rights reserved. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
| 15 | |
| 16 | list_versions = { |
| 17 | 'status_code': [300], |
| 18 | 'response_body': { |
| 19 | 'type': 'object', |
| 20 | 'properties': { |
| 21 | 'versions': { |
| 22 | 'type': 'array', |
| 23 | 'items': { |
| 24 | 'type': 'object', |
| 25 | 'properties': { |
| 26 | 'status': {'type': 'string'}, |
| 27 | 'updated': {'type': 'string'}, |
| 28 | 'id': {'type': 'string'}, |
| 29 | 'links': { |
| 30 | 'type': 'array', |
| 31 | 'items': { |
| 32 | 'type': 'object', |
| 33 | 'properties': { |
| 34 | 'href': {'type': 'string', |
| 35 | 'format': 'uri'}, |
| 36 | 'rel': {'type': 'string'}, |
| 37 | 'type': {'type': 'string'}, |
| 38 | }, |
| 39 | 'required': ['href', 'rel'] |
| 40 | } |
| 41 | }, |
| 42 | 'min_version': {'type': 'string'}, |
| 43 | 'version': {'type': 'string'}, |
| 44 | 'media-types': { |
| 45 | 'type': 'array', |
| 46 | 'properties': { |
| 47 | 'base': {'type': 'string'}, |
| 48 | 'type': {'type': 'string'} |
| 49 | }, |
| 50 | 'required': ['base', 'type'] |
| 51 | } |
| 52 | }, |
| 53 | 'required': ['status', 'updated', 'id', 'links', |
| 54 | 'min_version', 'version', 'media-types'] |
| 55 | } |
| 56 | } |
| 57 | }, |
| 58 | 'required': ['versions'], |
| 59 | } |
| 60 | } |