|
5312 | 5312 | "schema": { |
5313 | 5313 | "$ref": "#/components/schemas/CreateReaderCheckoutError" |
5314 | 5314 | } |
| 5315 | + }, |
| 5316 | + "application/problem+json": { |
| 5317 | + "schema": { |
| 5318 | + "$ref": "#/components/schemas/Problem" |
| 5319 | + } |
5315 | 5320 | } |
5316 | 5321 | } |
5317 | 5322 | }, |
|
5322 | 5327 | "schema": { |
5323 | 5328 | "$ref": "#/components/schemas/CreateReaderCheckoutError" |
5324 | 5329 | } |
5325 | | - } |
5326 | | - } |
5327 | | - }, |
5328 | | - "422": { |
5329 | | - "description": "Response when given params (or one of them) are invalid", |
5330 | | - "content": { |
5331 | | - "application/json": { |
| 5330 | + }, |
| 5331 | + "application/problem+json": { |
5332 | 5332 | "schema": { |
5333 | | - "$ref": "#/components/schemas/CreateReaderCheckoutUnprocessableEntity" |
| 5333 | + "$ref": "#/components/schemas/Problem" |
5334 | 5334 | } |
5335 | 5335 | } |
5336 | 5336 | } |
5337 | 5337 | }, |
5338 | | - "500": { |
5339 | | - "description": "Internal Server Error", |
| 5338 | + "404": { |
| 5339 | + "description": "Response when given reader is not found", |
5340 | 5340 | "content": { |
5341 | 5341 | "application/json": { |
5342 | 5342 | "schema": { |
5343 | | - "$ref": "#/components/schemas/CreateReaderCheckoutError" |
| 5343 | + "$ref": "#/components/schemas/NotFound" |
5344 | 5344 | } |
5345 | | - } |
5346 | | - } |
5347 | | - }, |
5348 | | - "502": { |
5349 | | - "description": "Bad Gateway", |
5350 | | - "content": { |
5351 | | - "application/json": { |
| 5345 | + }, |
| 5346 | + "application/problem+json": { |
5352 | 5347 | "schema": { |
5353 | | - "$ref": "#/components/schemas/CreateReaderCheckoutError" |
| 5348 | + "$ref": "#/components/schemas/Problem" |
5354 | 5349 | } |
5355 | 5350 | } |
5356 | 5351 | } |
5357 | 5352 | }, |
5358 | | - "504": { |
5359 | | - "description": "Gateway Timeout", |
| 5353 | + "422": { |
| 5354 | + "description": "Response when given params (or one of them) are invalid", |
5360 | 5355 | "content": { |
5361 | 5356 | "application/json": { |
5362 | 5357 | "schema": { |
5363 | | - "$ref": "#/components/schemas/CreateReaderCheckoutError" |
| 5358 | + "$ref": "#/components/schemas/CreateReaderCheckoutUnprocessableEntity" |
| 5359 | + } |
| 5360 | + }, |
| 5361 | + "application/problem+json": { |
| 5362 | + "schema": { |
| 5363 | + "$ref": "#/components/schemas/Problem" |
5364 | 5364 | } |
5365 | 5365 | } |
5366 | 5366 | } |
|
5459 | 5459 | "schema": { |
5460 | 5460 | "$ref": "#/components/schemas/BadRequest" |
5461 | 5461 | } |
| 5462 | + }, |
| 5463 | + "application/problem+json": { |
| 5464 | + "schema": { |
| 5465 | + "$ref": "#/components/schemas/Problem" |
| 5466 | + } |
5462 | 5467 | } |
5463 | 5468 | } |
5464 | 5469 | }, |
|
5469 | 5474 | "schema": { |
5470 | 5475 | "$ref": "#/components/schemas/Unauthorized" |
5471 | 5476 | } |
| 5477 | + }, |
| 5478 | + "application/problem+json": { |
| 5479 | + "schema": { |
| 5480 | + "$ref": "#/components/schemas/Problem" |
| 5481 | + } |
5472 | 5482 | } |
5473 | 5483 | } |
5474 | 5484 | }, |
|
5479 | 5489 | "schema": { |
5480 | 5490 | "$ref": "#/components/schemas/NotFound" |
5481 | 5491 | } |
5482 | | - } |
5483 | | - } |
5484 | | - }, |
5485 | | - "500": { |
5486 | | - "description": "Generic error response for backend failure", |
5487 | | - "content": { |
5488 | | - "application/json": { |
5489 | | - "schema": { |
5490 | | - "$ref": "#/components/schemas/InternalServerError" |
5491 | | - } |
5492 | | - } |
5493 | | - } |
5494 | | - }, |
5495 | | - "502": { |
5496 | | - "description": "Generic error response for an upstream service failure", |
5497 | | - "content": { |
5498 | | - "application/json": { |
5499 | | - "schema": { |
5500 | | - "$ref": "#/components/schemas/BadGateway" |
5501 | | - } |
5502 | | - } |
5503 | | - } |
5504 | | - }, |
5505 | | - "504": { |
5506 | | - "description": "Generic error response for an upstream service timeout", |
5507 | | - "content": { |
5508 | | - "application/json": { |
| 5492 | + }, |
| 5493 | + "application/problem+json": { |
5509 | 5494 | "schema": { |
5510 | | - "$ref": "#/components/schemas/GatewayTimeout" |
| 5495 | + "$ref": "#/components/schemas/Problem" |
5511 | 5496 | } |
5512 | 5497 | } |
5513 | 5498 | } |
|
5586 | 5571 | "schema": { |
5587 | 5572 | "$ref": "#/components/schemas/CreateReaderTerminateError" |
5588 | 5573 | } |
| 5574 | + }, |
| 5575 | + "application/problem+json": { |
| 5576 | + "schema": { |
| 5577 | + "$ref": "#/components/schemas/Problem" |
| 5578 | + } |
5589 | 5579 | } |
5590 | 5580 | } |
5591 | 5581 | }, |
|
5596 | 5586 | "schema": { |
5597 | 5587 | "$ref": "#/components/schemas/CreateReaderTerminateError" |
5598 | 5588 | } |
5599 | | - } |
5600 | | - } |
5601 | | - }, |
5602 | | - "422": { |
5603 | | - "description": "Response when given params (or one of them) are invalid", |
5604 | | - "content": { |
5605 | | - "application/json": { |
| 5589 | + }, |
| 5590 | + "application/problem+json": { |
5606 | 5591 | "schema": { |
5607 | | - "$ref": "#/components/schemas/CreateReaderTerminateUnprocessableEntity" |
| 5592 | + "$ref": "#/components/schemas/Problem" |
5608 | 5593 | } |
5609 | 5594 | } |
5610 | 5595 | } |
5611 | 5596 | }, |
5612 | | - "500": { |
5613 | | - "description": "Internal Server Error", |
| 5597 | + "404": { |
| 5598 | + "description": "Response when given reader is not found", |
5614 | 5599 | "content": { |
5615 | 5600 | "application/json": { |
5616 | 5601 | "schema": { |
5617 | | - "$ref": "#/components/schemas/CreateReaderTerminateError" |
| 5602 | + "$ref": "#/components/schemas/NotFound" |
5618 | 5603 | } |
5619 | | - } |
5620 | | - } |
5621 | | - }, |
5622 | | - "502": { |
5623 | | - "description": "Bad Gateway", |
5624 | | - "content": { |
5625 | | - "application/json": { |
| 5604 | + }, |
| 5605 | + "application/problem+json": { |
5626 | 5606 | "schema": { |
5627 | | - "$ref": "#/components/schemas/CreateReaderTerminateError" |
| 5607 | + "$ref": "#/components/schemas/Problem" |
5628 | 5608 | } |
5629 | 5609 | } |
5630 | 5610 | } |
5631 | 5611 | }, |
5632 | | - "504": { |
5633 | | - "description": "Gateway Timeout", |
| 5612 | + "422": { |
| 5613 | + "description": "Response when given params (or one of them) are invalid", |
5634 | 5614 | "content": { |
5635 | 5615 | "application/json": { |
5636 | 5616 | "schema": { |
5637 | | - "$ref": "#/components/schemas/CreateReaderTerminateError" |
| 5617 | + "$ref": "#/components/schemas/CreateReaderTerminateUnprocessableEntity" |
| 5618 | + } |
| 5619 | + }, |
| 5620 | + "application/problem+json": { |
| 5621 | + "schema": { |
| 5622 | + "$ref": "#/components/schemas/Problem" |
5638 | 5623 | } |
5639 | 5624 | } |
5640 | 5625 | } |
|
9228 | 9213 | ], |
9229 | 9214 | "title": "CreateReaderTerminateUnprocessableEntity" |
9230 | 9215 | }, |
9231 | | - "BadGateway": { |
9232 | | - "description": "502 Bad Gateway", |
9233 | | - "type": "object", |
9234 | | - "properties": { |
9235 | | - "errors": { |
9236 | | - "type": "object", |
9237 | | - "properties": { |
9238 | | - "detail": { |
9239 | | - "description": "Fuller message giving context to error", |
9240 | | - "type": "string" |
9241 | | - } |
9242 | | - }, |
9243 | | - "required": [ |
9244 | | - "detail" |
9245 | | - ] |
9246 | | - } |
9247 | | - }, |
9248 | | - "example": { |
9249 | | - "errors": { |
9250 | | - "detail": "Bad Gateway" |
9251 | | - } |
9252 | | - }, |
9253 | | - "required": [ |
9254 | | - "errors" |
9255 | | - ], |
9256 | | - "title": "BadGateway" |
9257 | | - }, |
9258 | 9216 | "CreateReaderTerminateError": { |
9259 | 9217 | "description": "Error description", |
9260 | 9218 | "type": "object", |
|
9346 | 9304 | ], |
9347 | 9305 | "title": "CreateReaderCheckoutResponse" |
9348 | 9306 | }, |
9349 | | - "GatewayTimeout": { |
9350 | | - "description": "504 Gateway Timeout", |
9351 | | - "type": "object", |
9352 | | - "properties": { |
9353 | | - "errors": { |
9354 | | - "type": "object", |
9355 | | - "properties": { |
9356 | | - "detail": { |
9357 | | - "description": "Fuller message giving context to error", |
9358 | | - "type": "string" |
9359 | | - } |
9360 | | - }, |
9361 | | - "required": [ |
9362 | | - "detail" |
9363 | | - ] |
9364 | | - } |
9365 | | - }, |
9366 | | - "example": { |
9367 | | - "errors": { |
9368 | | - "detail": "Gateway Timeout" |
9369 | | - } |
9370 | | - }, |
9371 | | - "required": [ |
9372 | | - "errors" |
9373 | | - ], |
9374 | | - "title": "GatewayTimeout" |
9375 | | - }, |
9376 | 9307 | "Unauthorized": { |
9377 | 9308 | "description": "401 Unauthorized", |
9378 | 9309 | "type": "object", |
|
9385 | 9316 | "type": "string" |
9386 | 9317 | }, |
9387 | 9318 | "type": { |
9388 | | - "description": "Key indicating type of error", |
| 9319 | + "description": "Key indicating type of error. Present only for typed 401 responses (e.g. invalid token, invalid password). Absent for generic unauthorized responses.", |
9389 | 9320 | "type": "string", |
9390 | 9321 | "enum": [ |
9391 | 9322 | "INVALID_ACCESS_TOKEN", |
9392 | 9323 | "INVALID_PASSWORD" |
9393 | 9324 | ] |
9394 | 9325 | } |
9395 | 9326 | }, |
9396 | | - "required": [ |
9397 | | - "type" |
9398 | | - ] |
9399 | | - } |
9400 | | - }, |
9401 | | - "example": { |
9402 | | - "errors": { |
9403 | | - "detail": "Invalid or expired access token", |
9404 | | - "type": "INVALID_ACCESS_TOKEN" |
9405 | | - } |
9406 | | - }, |
9407 | | - "required": [ |
9408 | | - "errors" |
9409 | | - ], |
9410 | | - "title": "Unauthorized" |
9411 | | - }, |
9412 | | - "InternalServerError": { |
9413 | | - "description": "500 Internal Server Error", |
9414 | | - "type": "object", |
9415 | | - "properties": { |
9416 | | - "errors": { |
9417 | | - "type": "object", |
9418 | | - "properties": { |
9419 | | - "detail": { |
9420 | | - "description": "Fuller message giving context to error", |
9421 | | - "type": "string" |
9422 | | - } |
9423 | | - }, |
9424 | 9327 | "required": [ |
9425 | 9328 | "detail" |
9426 | 9329 | ] |
9427 | 9330 | } |
9428 | 9331 | }, |
9429 | 9332 | "example": { |
9430 | 9333 | "errors": { |
9431 | | - "detail": "Internal Server Error" |
| 9334 | + "detail": "Unauthorized" |
9432 | 9335 | } |
9433 | 9336 | }, |
9434 | 9337 | "required": [ |
9435 | 9338 | "errors" |
9436 | 9339 | ], |
9437 | | - "title": "InternalServerError" |
| 9340 | + "title": "Unauthorized" |
9438 | 9341 | }, |
9439 | 9342 | "CreateReaderCheckoutRequest": { |
9440 | 9343 | "description": "Reader Checkout", |
|
0 commit comments