|
20 | 20 | } |
21 | 21 | }, |
22 | 22 | "schemas": { |
| 23 | + "Background": { |
| 24 | + "type": "object", |
| 25 | + "required": [ |
| 26 | + "backgroundImage", |
| 27 | + "backgroundColor", |
| 28 | + "primaryColor", |
| 29 | + "version" |
| 30 | + ], |
| 31 | + "properties": { |
| 32 | + "backgroundImage": { |
| 33 | + "type": "string", |
| 34 | + "nullable": true |
| 35 | + }, |
| 36 | + "backgroundColor": { |
| 37 | + "type": "string" |
| 38 | + }, |
| 39 | + "primaryColor": { |
| 40 | + "type": "string" |
| 41 | + }, |
| 42 | + "version": { |
| 43 | + "type": "integer", |
| 44 | + "format": "int64" |
| 45 | + } |
| 46 | + } |
| 47 | + }, |
23 | 48 | "OCSMeta": { |
24 | 49 | "type": "object", |
25 | 50 | "required": [ |
|
602 | 627 | "basic_auth": [] |
603 | 628 | } |
604 | 629 | ], |
| 630 | + "parameters": [ |
| 631 | + { |
| 632 | + "name": "OCS-APIRequest", |
| 633 | + "in": "header", |
| 634 | + "description": "Required to be true for the API request to pass", |
| 635 | + "required": true, |
| 636 | + "schema": { |
| 637 | + "type": "boolean", |
| 638 | + "default": true |
| 639 | + } |
| 640 | + } |
| 641 | + ], |
605 | 642 | "responses": { |
606 | 643 | "200": { |
607 | 644 | "description": "Background image returned", |
|
627 | 664 | } |
628 | 665 | } |
629 | 666 | }, |
| 667 | + "/index.php/apps/theming/background/{type}": { |
| 668 | + "post": { |
| 669 | + "operationId": "user_theme-set-background", |
| 670 | + "summary": "Set the background", |
| 671 | + "tags": [ |
| 672 | + "user_theme" |
| 673 | + ], |
| 674 | + "security": [ |
| 675 | + { |
| 676 | + "bearer_auth": [] |
| 677 | + }, |
| 678 | + { |
| 679 | + "basic_auth": [] |
| 680 | + } |
| 681 | + ], |
| 682 | + "requestBody": { |
| 683 | + "required": false, |
| 684 | + "content": { |
| 685 | + "application/json": { |
| 686 | + "schema": { |
| 687 | + "type": "object", |
| 688 | + "properties": { |
| 689 | + "value": { |
| 690 | + "type": "string", |
| 691 | + "default": "", |
| 692 | + "description": "Path of the background image" |
| 693 | + }, |
| 694 | + "color": { |
| 695 | + "type": "string", |
| 696 | + "nullable": true, |
| 697 | + "description": "Color for the background" |
| 698 | + } |
| 699 | + } |
| 700 | + } |
| 701 | + } |
| 702 | + } |
| 703 | + }, |
| 704 | + "parameters": [ |
| 705 | + { |
| 706 | + "name": "type", |
| 707 | + "in": "path", |
| 708 | + "description": "Type of background", |
| 709 | + "required": true, |
| 710 | + "schema": { |
| 711 | + "type": "string" |
| 712 | + } |
| 713 | + }, |
| 714 | + { |
| 715 | + "name": "OCS-APIRequest", |
| 716 | + "in": "header", |
| 717 | + "description": "Required to be true for the API request to pass", |
| 718 | + "required": true, |
| 719 | + "schema": { |
| 720 | + "type": "boolean", |
| 721 | + "default": true |
| 722 | + } |
| 723 | + } |
| 724 | + ], |
| 725 | + "responses": { |
| 726 | + "200": { |
| 727 | + "description": "Background set successfully", |
| 728 | + "content": { |
| 729 | + "application/json": { |
| 730 | + "schema": { |
| 731 | + "$ref": "#/components/schemas/Background" |
| 732 | + } |
| 733 | + } |
| 734 | + } |
| 735 | + }, |
| 736 | + "400": { |
| 737 | + "description": "Setting background is not possible", |
| 738 | + "content": { |
| 739 | + "application/json": { |
| 740 | + "schema": { |
| 741 | + "type": "object", |
| 742 | + "required": [ |
| 743 | + "error" |
| 744 | + ], |
| 745 | + "properties": { |
| 746 | + "error": { |
| 747 | + "type": "string" |
| 748 | + } |
| 749 | + } |
| 750 | + } |
| 751 | + } |
| 752 | + } |
| 753 | + }, |
| 754 | + "500": { |
| 755 | + "description": "", |
| 756 | + "content": { |
| 757 | + "application/json": { |
| 758 | + "schema": { |
| 759 | + "type": "object", |
| 760 | + "required": [ |
| 761 | + "error" |
| 762 | + ], |
| 763 | + "properties": { |
| 764 | + "error": { |
| 765 | + "type": "string" |
| 766 | + } |
| 767 | + } |
| 768 | + } |
| 769 | + } |
| 770 | + } |
| 771 | + } |
| 772 | + } |
| 773 | + } |
| 774 | + }, |
| 775 | + "/index.php/apps/theming/background/custom": { |
| 776 | + "delete": { |
| 777 | + "operationId": "user_theme-delete-background", |
| 778 | + "summary": "Delete the background", |
| 779 | + "tags": [ |
| 780 | + "user_theme" |
| 781 | + ], |
| 782 | + "security": [ |
| 783 | + { |
| 784 | + "bearer_auth": [] |
| 785 | + }, |
| 786 | + { |
| 787 | + "basic_auth": [] |
| 788 | + } |
| 789 | + ], |
| 790 | + "parameters": [ |
| 791 | + { |
| 792 | + "name": "OCS-APIRequest", |
| 793 | + "in": "header", |
| 794 | + "description": "Required to be true for the API request to pass", |
| 795 | + "required": true, |
| 796 | + "schema": { |
| 797 | + "type": "boolean", |
| 798 | + "default": true |
| 799 | + } |
| 800 | + } |
| 801 | + ], |
| 802 | + "responses": { |
| 803 | + "200": { |
| 804 | + "description": "Background deleted successfully", |
| 805 | + "content": { |
| 806 | + "application/json": { |
| 807 | + "schema": { |
| 808 | + "$ref": "#/components/schemas/Background" |
| 809 | + } |
| 810 | + } |
| 811 | + } |
| 812 | + } |
| 813 | + } |
| 814 | + } |
| 815 | + }, |
630 | 816 | "/ocs/v2.php/apps/theming/api/v1/theme/{themeId}/enable": { |
631 | 817 | "put": { |
632 | 818 | "operationId": "user_theme-enable-theme", |
|
0 commit comments