|
8 | 8 | servers: |
9 | 9 | - url: /api/data |
10 | 10 | paths: |
| 11 | + /search/query: |
| 12 | + get: |
| 13 | + summary: Run a search query. |
| 14 | + parameters: |
| 15 | + - in: query |
| 16 | + description: query parameters |
| 17 | + name: params |
| 18 | + style: form |
| 19 | + explode: true |
| 20 | + schema: |
| 21 | + $ref: "#/components/schemas/SearchQuery" |
| 22 | + responses: |
| 23 | + "422": |
| 24 | + description: Failed to validate the query parameters |
| 25 | + "500": |
| 26 | + description: Internal server error. |
| 27 | + "503": |
| 28 | + description: Temporary internal error. |
| 29 | + "200": |
| 30 | + description: Search results according to the query. |
| 31 | + #NOTE: This is not the standard way we do pagination, but to |
| 32 | + #be compatible witht the current search API we make an |
| 33 | + #exception for the search here |
| 34 | + headers: |
| 35 | + x-page: |
| 36 | + required: true |
| 37 | + schema: |
| 38 | + type: integer |
| 39 | + format: int32 |
| 40 | + x-per-page: |
| 41 | + required: true |
| 42 | + schema: |
| 43 | + type: integer |
| 44 | + format: int32 |
| 45 | + x-total: |
| 46 | + required: true |
| 47 | + schema: |
| 48 | + type: integer |
| 49 | + format: int64 |
| 50 | + x-total-pages: |
| 51 | + required: true |
| 52 | + schema: |
| 53 | + type: integer |
| 54 | + format: int32 |
| 55 | + content: |
| 56 | + application/json: |
| 57 | + schema: |
| 58 | + $ref: "#/components/schemas/SearchResult" |
11 | 59 | /search/reprovision: |
12 | 60 | post: |
13 | 61 | summary: Start a new reprovisioning |
@@ -56,6 +104,261 @@ paths: |
56 | 104 |
|
57 | 105 | components: |
58 | 106 | schemas: |
| 107 | + SearchQuery: |
| 108 | + description: Query params for the search request |
| 109 | + allOf: |
| 110 | + - $ref: "#/components/schemas/PaginationRequest" |
| 111 | + - properties: |
| 112 | + q: |
| 113 | + description: The search query. |
| 114 | + type: string |
| 115 | + default: "" |
| 116 | + PaginationRequest: |
| 117 | + type: object |
| 118 | + additionalProperties: false |
| 119 | + properties: |
| 120 | + page: |
| 121 | + description: Result's page number starting from 1 |
| 122 | + type: integer |
| 123 | + minimum: 1 |
| 124 | + default: 1 |
| 125 | + per_page: |
| 126 | + description: The number of results per page |
| 127 | + type: integer |
| 128 | + minimum: 1 |
| 129 | + maximum: 100 |
| 130 | + default: 20 |
| 131 | + FacetData: |
| 132 | + title: FacetData |
| 133 | + examples: |
| 134 | + - entityType: |
| 135 | + Project: 15 |
| 136 | + User: 3 |
| 137 | + type: object |
| 138 | + required: |
| 139 | + - entityType |
| 140 | + properties: |
| 141 | + entityType: |
| 142 | + $ref: '#/components/schemas/Map_EntityType_Int' |
| 143 | + Group: |
| 144 | + title: Group |
| 145 | + examples: |
| 146 | + - type: Group |
| 147 | + id: 2CAF4C73F50D4514A041C9EDDB025A36 |
| 148 | + name: SDSC |
| 149 | + namespace: SDSC |
| 150 | + description: SDSC group |
| 151 | + score: 1.1 |
| 152 | + type: object |
| 153 | + required: |
| 154 | + - id |
| 155 | + - name |
| 156 | + - namespace |
| 157 | + - type |
| 158 | + properties: |
| 159 | + id: |
| 160 | + type: string |
| 161 | + name: |
| 162 | + type: string |
| 163 | + namespace: |
| 164 | + type: string |
| 165 | + description: |
| 166 | + type: string |
| 167 | + score: |
| 168 | + type: number |
| 169 | + format: double |
| 170 | + type: |
| 171 | + type: string |
| 172 | + const: Group |
| 173 | + Map_EntityType_Int: |
| 174 | + title: Map_EntityType_Int |
| 175 | + type: object |
| 176 | + additionalProperties: |
| 177 | + type: integer |
| 178 | + format: int32 |
| 179 | + PageDef: |
| 180 | + title: PageDef |
| 181 | + type: object |
| 182 | + required: |
| 183 | + - limit |
| 184 | + - offset |
| 185 | + properties: |
| 186 | + limit: |
| 187 | + type: integer |
| 188 | + format: int32 |
| 189 | + offset: |
| 190 | + type: integer |
| 191 | + format: int32 |
| 192 | + PageWithTotals: |
| 193 | + title: PageWithTotals |
| 194 | + type: object |
| 195 | + required: |
| 196 | + - page |
| 197 | + - totalResult |
| 198 | + - totalPages |
| 199 | + properties: |
| 200 | + page: |
| 201 | + $ref: '#/components/schemas/PageDef' |
| 202 | + totalResult: |
| 203 | + type: integer |
| 204 | + format: int64 |
| 205 | + totalPages: |
| 206 | + type: integer |
| 207 | + format: int32 |
| 208 | + prevPage: |
| 209 | + type: integer |
| 210 | + format: int32 |
| 211 | + nextPage: |
| 212 | + type: integer |
| 213 | + format: int32 |
| 214 | + SearchProject: |
| 215 | + title: Project |
| 216 | + examples: |
| 217 | + - type: Project |
| 218 | + id: 01HRA7AZ2Q234CDQWGA052F8MK |
| 219 | + name: renku |
| 220 | + slug: renku |
| 221 | + namespace: |
| 222 | + type: Group |
| 223 | + id: 2CAF4C73F50D4514A041C9EDDB025A36 |
| 224 | + name: SDSC |
| 225 | + namespace: SDSC |
| 226 | + description: SDSC group |
| 227 | + score: 1.1 |
| 228 | + repositories: |
| 229 | + - https://github.com/renku |
| 230 | + visibility: public |
| 231 | + description: Renku project |
| 232 | + createdBy: |
| 233 | + type: User |
| 234 | + id: 1CAF4C73F50D4514A041C9EDDB025A36 |
| 235 | + namespace: renku/renku |
| 236 | + firstName: Albert |
| 237 | + lastName: Einstein |
| 238 | + score: 2.1 |
| 239 | + creationDate: '2025-03-06T15:05:42.058323392Z' |
| 240 | + keywords: |
| 241 | + - data |
| 242 | + - science |
| 243 | + score: 1 |
| 244 | + type: object |
| 245 | + required: |
| 246 | + - id |
| 247 | + - name |
| 248 | + - slug |
| 249 | + - visibility |
| 250 | + - creationDate |
| 251 | + - type |
| 252 | + properties: |
| 253 | + id: |
| 254 | + type: string |
| 255 | + name: |
| 256 | + type: string |
| 257 | + slug: |
| 258 | + type: string |
| 259 | + namespace: |
| 260 | + $ref: '#/components/schemas/UserOrGroup' |
| 261 | + repositories: |
| 262 | + type: array |
| 263 | + items: |
| 264 | + type: string |
| 265 | + visibility: |
| 266 | + $ref: '#/components/schemas/Visibility' |
| 267 | + description: |
| 268 | + type: string |
| 269 | + createdBy: |
| 270 | + $ref: '#/components/schemas/User' |
| 271 | + creationDate: |
| 272 | + type: string |
| 273 | + format: date-time |
| 274 | + keywords: |
| 275 | + type: array |
| 276 | + items: |
| 277 | + type: string |
| 278 | + score: |
| 279 | + type: number |
| 280 | + format: double |
| 281 | + type: |
| 282 | + type: string |
| 283 | + const: Project |
| 284 | + SearchEntity: |
| 285 | + title: SearchEntity |
| 286 | + oneOf: |
| 287 | + - $ref: '#/components/schemas/Group' |
| 288 | + - $ref: '#/components/schemas/SearchProject' |
| 289 | + - $ref: '#/components/schemas/User' |
| 290 | + discriminator: |
| 291 | + propertyName: type |
| 292 | + mapping: |
| 293 | + Group: '#/components/schemas/Group' |
| 294 | + Project: '#/components/schemas/SearchProject' |
| 295 | + User: '#/components/schemas/User' |
| 296 | + SearchResult: |
| 297 | + title: SearchResult |
| 298 | + type: object |
| 299 | + required: |
| 300 | + - facets |
| 301 | + - pagingInfo |
| 302 | + properties: |
| 303 | + items: |
| 304 | + type: array |
| 305 | + items: |
| 306 | + $ref: '#/components/schemas/SearchEntity' |
| 307 | + facets: |
| 308 | + $ref: '#/components/schemas/FacetData' |
| 309 | + pagingInfo: |
| 310 | + $ref: '#/components/schemas/PageWithTotals' |
| 311 | + User: |
| 312 | + title: User |
| 313 | + examples: |
| 314 | + - type: User |
| 315 | + id: 1CAF4C73F50D4514A041C9EDDB025A36 |
| 316 | + namespace: renku/renku |
| 317 | + firstName: Albert |
| 318 | + lastName: Einstein |
| 319 | + score: 2.1 |
| 320 | + type: object |
| 321 | + required: |
| 322 | + - id |
| 323 | + - type |
| 324 | + properties: |
| 325 | + id: |
| 326 | + type: string |
| 327 | + namespace: |
| 328 | + type: string |
| 329 | + firstName: |
| 330 | + type: string |
| 331 | + lastName: |
| 332 | + type: string |
| 333 | + score: |
| 334 | + type: number |
| 335 | + format: double |
| 336 | + type: |
| 337 | + type: string |
| 338 | + const: User |
| 339 | + UserOrGroup: |
| 340 | + title: UserOrGroup |
| 341 | + examples: |
| 342 | + - type: Group |
| 343 | + id: 2CAF4C73F50D4514A041C9EDDB025A36 |
| 344 | + name: SDSC |
| 345 | + namespace: SDSC |
| 346 | + description: SDSC group |
| 347 | + score: 1.1 |
| 348 | + oneOf: |
| 349 | + - $ref: '#/components/schemas/Group' |
| 350 | + - $ref: '#/components/schemas/User' |
| 351 | + discriminator: |
| 352 | + propertyName: type |
| 353 | + mapping: |
| 354 | + Group: '#/components/schemas/Group' |
| 355 | + User: '#/components/schemas/User' |
| 356 | + Visibility: |
| 357 | + description: Project's visibility levels |
| 358 | + type: string |
| 359 | + enum: |
| 360 | + - private |
| 361 | + - public |
59 | 362 | Reprovisioning: |
60 | 363 | description: A reprovisioning |
61 | 364 | type: object |
|
0 commit comments