|
20 | 20 | { "$ref": "./global/parameters.json#/SearchLanguage" } |
21 | 21 | ], |
22 | 22 | "responses": { |
23 | | - "200": { |
24 | | - "description": "A list of search results", |
25 | | - "content": { |
26 | | - "application/json": { |
27 | | - "schema": { |
28 | | - "$ref": "./global/schema-parts.json#/SearchItemResultList" |
29 | | - }, |
30 | | - "example": { |
31 | | - "results": [ |
32 | | - { |
33 | | - "id": "Q123", |
34 | | - "label": { "language": "en", "value": "potato" }, |
35 | | - "description": { "language": "en", "value": "staple food" }, |
36 | | - "match": { "type": "label", "language": "en", "text": "potato" } |
37 | | - }, |
38 | | - { |
39 | | - "id": "Q234", |
40 | | - "label": { "language": "en", "value": "potato" }, |
41 | | - "description": { "language": "en", "value": "species of plant" }, |
42 | | - "match": { "type": "label", "language": "en", "text": "potato" } |
43 | | - } |
44 | | - ] |
45 | | - } |
46 | | - } |
47 | | - } |
48 | | - }, |
49 | | - "400": { |
50 | | - "description": "The request cannot be processed", |
51 | | - "content": { |
52 | | - "application/json": { |
53 | | - "schema": { |
54 | | - "type": "object", |
55 | | - "properties": { |
56 | | - "code": { "type": "string" }, |
57 | | - "message": { "type": "string" }, |
58 | | - "context": { "type": "object" } |
59 | | - }, |
60 | | - "required": [ "code", "message" ], |
61 | | - "additionalProperties": false |
62 | | - }, |
63 | | - "examples": { |
64 | | - "invalid-query-parameter": { |
65 | | - "value": { |
66 | | - "code": "invalid-query-parameter", |
67 | | - "message": "Invalid query parameter: 'language'", |
68 | | - "context": { "parameter": "language" } |
69 | | - } |
70 | | - } |
71 | | - } |
72 | | - } |
73 | | - }, |
74 | | - "headers": { |
75 | | - "Content-Language": { |
76 | | - "description": "Language code of the language in which error message is provided", |
77 | | - "schema": { "type": "string" }, |
78 | | - "required": true |
79 | | - } |
80 | | - } |
81 | | - } |
| 23 | + "200": { "$ref": "./global/responses.json#/SearchItemSuccess" }, |
| 24 | + "400": { "$ref": "./global/responses.json#/BadRequest" } |
82 | 25 | } |
83 | 26 | } |
84 | 27 | }, |
|
96 | 39 | { "$ref": "./global/parameters.json#/SearchLanguage" } |
97 | 40 | ], |
98 | 41 | "responses": { |
99 | | - "200": { |
100 | | - "description": "A list of search results", |
101 | | - "content": { |
102 | | - "application/json": { |
103 | | - "schema": { |
104 | | - "$ref": "./global/schema-parts.json#/SearchPropertyResultList" |
105 | | - }, |
106 | | - "example": { |
107 | | - "results": [ |
108 | | - { |
109 | | - "id": "P123", |
110 | | - "label": { "language": "en", "value": "taxon name" }, |
111 | | - "description": { "language": "en", "value": "scientific name of a taxon" }, |
112 | | - "match": { "type": "label", "language": "en", "text": "taxon" } |
113 | | - }, |
114 | | - { |
115 | | - "id": "P234", |
116 | | - "label": { "language": "en", "value": "taxon rank" }, |
117 | | - "description": { "language": "en", "value": "level in a taxonomic hierarchy" }, |
118 | | - "match": { "type": "label", "language": "en", "text": "taxon" } |
119 | | - } |
120 | | - ] |
121 | | - } |
122 | | - } |
123 | | - } |
124 | | - }, |
125 | | - "400": { |
126 | | - "description": "The request cannot be processed", |
127 | | - "content": { |
128 | | - "application/json": { |
129 | | - "schema": { |
130 | | - "type": "object", |
131 | | - "properties": { |
132 | | - "code": { "type": "string" }, |
133 | | - "message": { "type": "string" }, |
134 | | - "context": { "type": "object" } |
135 | | - }, |
136 | | - "required": [ "code", "message" ], |
137 | | - "additionalProperties": false |
138 | | - }, |
139 | | - "examples": { |
140 | | - "invalid-query-parameter": { |
141 | | - "value": { |
142 | | - "code": "invalid-query-parameter", |
143 | | - "message": "Invalid query parameter: 'language'", |
144 | | - "context": { "parameter": "language" } |
145 | | - } |
146 | | - } |
147 | | - } |
148 | | - } |
149 | | - }, |
150 | | - "headers": { |
151 | | - "Content-Language": { |
152 | | - "description": "Language code of the language in which error message is provided", |
153 | | - "schema": { "type": "string" }, |
154 | | - "required": true |
155 | | - } |
156 | | - } |
157 | | - } |
| 42 | + "200": { "$ref": "./global/responses.json#/SearchPropertySuccess" }, |
| 43 | + "400": { "$ref": "./global/responses.json#/BadRequest" } |
158 | 44 | } |
159 | 45 | } |
160 | 46 | } |
|
0 commit comments