|
146 | 146 | "$ref": "#/components/parameters/tea_product_identifier" |
147 | 147 | } |
148 | 148 | ], |
149 | | - "responses": { |
150 | | - "204": { |
151 | | - "description": "TEA Product successfully deleted" |
152 | | - }, |
153 | | - "401": { "$ref": "#/components/responses/401-unauthorized" }, |
154 | | - "404": { |
155 | | - "$ref": "#/components/responses/404-object-by-id-not-found" |
156 | | - } |
157 | | - }, |
| 149 | + "$ref": "#/components/operations/standard_delete", |
158 | 150 | "tags": [ |
159 | 151 | "TEA Product" |
160 | | - ], |
161 | | - "security": [ |
162 | | - { |
163 | | - "bearerAuth": [] |
164 | | - }, |
165 | | - { |
166 | | - "basicAuth": [] |
167 | | - } |
168 | 152 | ] |
169 | 153 | } |
170 | 154 | }, |
|
174 | 158 | "operationId": "listTeaProducts", |
175 | 159 | "parameters": [ |
176 | 160 | { |
177 | | - "$ref": "#/components/parameters/page-offset" |
178 | | - }, |
179 | | - { |
180 | | - "$ref": "#/components/parameters/page-size" |
181 | | - }, |
182 | | - { |
183 | | - "$ref": "#/components/parameters/purl" |
184 | | - }, |
185 | | - { |
186 | | - "$ref": "#/components/parameters/barcode" |
187 | | - }, |
188 | | - { |
189 | | - "$ref": "#/components/parameters/sku" |
190 | | - }, |
191 | | - { |
192 | | - "$ref": "#/components/parameters/vendor_uuid" |
| 161 | + "$ref": "#/components/parameters/standard_pagination" |
193 | 162 | } |
194 | 163 | ], |
195 | 164 | "responses": { |
196 | 165 | "200": { |
197 | | - "description": "List of TEA Products retrieved successfully", |
| 166 | + "description": "List retrieved successfully", |
198 | 167 | "content": { |
199 | 168 | "application/json": { |
200 | 169 | "schema": { |
201 | | - "type": "object", |
202 | | - "properties": { |
203 | | - "pagination": { |
204 | | - "$ref": "#/components/schemas/type_pagination_details" |
205 | | - }, |
206 | | - "items": { |
207 | | - "type": "array", |
208 | | - "items": { |
209 | | - "$ref": "#/components/schemas/tea_product" |
210 | | - } |
211 | | - } |
212 | | - }, |
213 | | - "required": [ |
214 | | - "pagination", |
215 | | - "items" |
216 | | - ] |
| 170 | + "$ref": "#/components/schemas/paginated_product_list" |
217 | 171 | } |
218 | 172 | } |
219 | 173 | } |
220 | | - } |
221 | | - }, |
222 | | - "tags": [ |
223 | | - "TEA Product" |
224 | | - ] |
| 174 | + }, |
| 175 | + "$ref": "#/components/responses/standard_errors" |
| 176 | + } |
225 | 177 | }, |
226 | 178 | "post": { |
227 | 179 | "description": "Create TEA Product entry for the supplied product identifier", |
|
523 | 475 | "$ref": "#/components/parameters/tea_leaf_identifier" |
524 | 476 | } |
525 | 477 | ], |
526 | | - "responses": { |
527 | | - "204": { |
528 | | - "description": "TEA Leaf successfully deleted" |
529 | | - }, |
530 | | - "401": { "$ref": "#/components/responses/401-unauthorized" }, |
531 | | - "404": { |
532 | | - "$ref": "#/components/responses/404-object-by-id-not-found" |
533 | | - } |
534 | | - }, |
| 478 | + "$ref": "#/components/operations/standard_delete", |
535 | 479 | "tags": [ |
536 | 480 | "TEA Leaf" |
537 | | - ], |
538 | | - "security": [ |
539 | | - { |
540 | | - "bearerAuth": [] |
541 | | - }, |
542 | | - { |
543 | | - "basicAuth": [] |
544 | | - } |
545 | 481 | ] |
546 | 482 | } |
547 | 483 | }, |
|
930 | 866 | "$ref": "#/components/parameters/tea_collection_identifier" |
931 | 867 | } |
932 | 868 | ], |
933 | | - "responses": { |
934 | | - "204": { |
935 | | - "description": "TEA Collection successfully deleted" |
936 | | - }, |
937 | | - "401": { "$ref": "#/components/responses/401-unauthorized" }, |
938 | | - "404": { |
939 | | - "$ref": "#/components/responses/404-object-by-id-not-found" |
940 | | - } |
941 | | - }, |
| 869 | + "$ref": "#/components/operations/standard_delete", |
942 | 870 | "tags": [ |
943 | 871 | "TEA Collection" |
944 | | - ], |
945 | | - "security": [ |
946 | | - { |
947 | | - "bearerAuth": [] |
948 | | - }, |
949 | | - { |
950 | | - "basicAuth": [] |
951 | | - } |
952 | 872 | ] |
953 | 873 | } |
954 | 874 | } |
955 | 875 | }, |
956 | 876 | "webhooks": {}, |
957 | 877 | "components": { |
958 | 878 | "schemas": { |
959 | | - "tea_product": { |
| 879 | + "base_product_fields": { |
960 | 880 | "type": "object", |
961 | 881 | "properties": { |
962 | | - "identifier": { |
963 | | - "$ref": "#/components/schemas/type_uuid" |
964 | | - }, |
965 | 882 | "product_name": { |
966 | 883 | "type": "string" |
967 | 884 | }, |
968 | | - "purl": { |
969 | | - "type": "string", |
970 | | - "description": "Package URL (PURL)" |
971 | | - }, |
972 | 885 | "barcode": { |
973 | 886 | "type": "string", |
974 | 887 | "description": "Barcode" |
|
981 | 894 | "$ref": "#/components/schemas/type_uuid", |
982 | 895 | "description": "Vendor UUID" |
983 | 896 | }, |
984 | | - "leaf_references": { |
985 | | - "type": "array", |
986 | | - "items": { |
987 | | - "$ref": "#/components/schemas/type_uuid" |
988 | | - }, |
989 | | - "description": "Array of UUIDs referencing TEA Leaf entries" |
| 897 | + "purl": { |
| 898 | + "type": "string", |
| 899 | + "description": "Package URL (PURL)" |
| 900 | + } |
| 901 | + } |
| 902 | + }, |
| 903 | + "base_versioned_product": { |
| 904 | + "allOf": [ |
| 905 | + { "$ref": "#/components/schemas/base_product_fields" }, |
| 906 | + { |
| 907 | + "type": "object", |
| 908 | + "properties": { |
| 909 | + "product_version": { |
| 910 | + "type": "string" |
| 911 | + }, |
| 912 | + "release_date": { |
| 913 | + "type": "string", |
| 914 | + "format": "date-time", |
| 915 | + "example": "2024-03-20T15:30:00Z" |
| 916 | + } |
| 917 | + } |
990 | 918 | } |
991 | | - }, |
992 | | - "required": [ |
993 | | - "identifier", |
994 | | - "product_name" |
995 | 919 | ] |
996 | 920 | }, |
997 | | - "tea_leaf": { |
| 921 | + "base_artifact_object": { |
998 | 922 | "type": "object", |
999 | 923 | "properties": { |
1000 | 924 | "identifier": { |
1001 | 925 | "$ref": "#/components/schemas/type_uuid" |
1002 | 926 | }, |
1003 | | - "product_name": { |
| 927 | + "description": { |
1004 | 928 | "type": "string" |
1005 | 929 | }, |
1006 | | - "product_version": { |
| 930 | + "mime_type": { |
1007 | 931 | "type": "string" |
1008 | 932 | }, |
1009 | | - "release_date": { |
| 933 | + "artifact_url": { |
1010 | 934 | "type": "string", |
1011 | | - "format": "date-time", |
1012 | | - "example": "2024-03-20T15:30:00Z" |
| 935 | + "format": "uri" |
1013 | 936 | }, |
1014 | | - "pre_release": { |
1015 | | - "type": "boolean" |
| 937 | + "artifact_size_in_bytes": { |
| 938 | + "type": "integer", |
| 939 | + "format": "int64" |
1016 | 940 | }, |
1017 | | - "end_of_life": { |
| 941 | + "artifact_checksum": { |
1018 | 942 | "type": "string", |
1019 | | - "format": "date-time", |
1020 | | - "example": "2024-03-20T15:30:00Z" |
| 943 | + "description": "The checksum value" |
1021 | 944 | }, |
1022 | | - "collection_references": { |
1023 | | - "type": "array", |
1024 | | - "items": { |
1025 | | - "$ref": "#/components/schemas/type_uuid" |
| 945 | + "artifact_checksum_type": { |
| 946 | + "type": "string", |
| 947 | + "description": "The algorithm used to generate the checksum", |
| 948 | + "enum": [ |
| 949 | + "SHA512", |
| 950 | + "SHA384", |
| 951 | + "SHA256", |
| 952 | + "SHA224", |
| 953 | + "SHA1", |
| 954 | + "MD5", |
| 955 | + "BLAKE2b-512", |
| 956 | + "BLAKE2s-256", |
| 957 | + "BLAKE3" |
| 958 | + ], |
| 959 | + "default": "SHA256" |
| 960 | + } |
| 961 | + } |
| 962 | + }, |
| 963 | + "tea_product": { |
| 964 | + "allOf": [ |
| 965 | + { "$ref": "#/components/schemas/base_product_fields" }, |
| 966 | + { |
| 967 | + "type": "object", |
| 968 | + "properties": { |
| 969 | + "identifier": { |
| 970 | + "$ref": "#/components/schemas/type_uuid" |
| 971 | + }, |
| 972 | + "leaf_references": { |
| 973 | + "type": "array", |
| 974 | + "items": { |
| 975 | + "$ref": "#/components/schemas/type_uuid" |
| 976 | + }, |
| 977 | + "description": "Array of UUIDs referencing TEA Leaf entries" |
| 978 | + } |
1026 | 979 | }, |
1027 | | - "description": "Array of UUIDs referencing TEA Collection entries", |
1028 | | - "default": [] |
| 980 | + "required": ["identifier", "product_name"] |
| 981 | + } |
| 982 | + ] |
| 983 | + }, |
| 984 | + "tea_leaf": { |
| 985 | + "allOf": [ |
| 986 | + { "$ref": "#/components/schemas/base_versioned_product" }, |
| 987 | + { |
| 988 | + "type": "object", |
| 989 | + "properties": { |
| 990 | + "identifier": { |
| 991 | + "$ref": "#/components/schemas/type_uuid" |
| 992 | + }, |
| 993 | + "pre_release": { |
| 994 | + "type": "boolean" |
| 995 | + }, |
| 996 | + "end_of_life": { |
| 997 | + "type": "string", |
| 998 | + "format": "date-time" |
| 999 | + }, |
| 1000 | + "collection_references": { |
| 1001 | + "type": "array", |
| 1002 | + "items": { |
| 1003 | + "$ref": "#/components/schemas/type_uuid" |
| 1004 | + }, |
| 1005 | + "description": "Array of UUIDs referencing TEA Collection entries", |
| 1006 | + "default": [] |
| 1007 | + } |
| 1008 | + }, |
| 1009 | + "required": [ |
| 1010 | + "identifier", |
| 1011 | + "product_name", |
| 1012 | + "product_version", |
| 1013 | + "release_date", |
| 1014 | + "pre_release" |
| 1015 | + ] |
1029 | 1016 | } |
1030 | | - }, |
1031 | | - "required": [ |
1032 | | - "identifier", |
1033 | | - "product_name", |
1034 | | - "product_version", |
1035 | | - "release_date", |
1036 | | - "pre_release" |
1037 | 1017 | ] |
1038 | 1018 | }, |
1039 | 1019 | "tea_collection": { |
|
1325 | 1305 | } |
1326 | 1306 | }, |
1327 | 1307 | "responses": { |
| 1308 | + "base_error": { |
| 1309 | + "type": "object", |
| 1310 | + "properties": { |
| 1311 | + "error": { |
| 1312 | + "type": "string" |
| 1313 | + }, |
| 1314 | + "message": { |
| 1315 | + "type": "string" |
| 1316 | + } |
| 1317 | + } |
| 1318 | + }, |
1328 | 1319 | "404-object-by-id-not-found": { |
1329 | 1320 | "description": "Object requested by identifier not found", |
1330 | 1321 | "content": { |
|
1443 | 1434 | "type": "http", |
1444 | 1435 | "scheme": "basic" |
1445 | 1436 | } |
| 1437 | + }, |
| 1438 | + "security_requirements": { |
| 1439 | + "standard_auth": [ |
| 1440 | + { |
| 1441 | + "bearerAuth": [] |
| 1442 | + }, |
| 1443 | + { |
| 1444 | + "basicAuth": [] |
| 1445 | + } |
| 1446 | + ] |
| 1447 | + }, |
| 1448 | + "responses": { |
| 1449 | + "standard_errors": { |
| 1450 | + "400": { |
| 1451 | + "description": "Invalid request body", |
| 1452 | + "content": { |
| 1453 | + "application/json": {} |
| 1454 | + } |
| 1455 | + }, |
| 1456 | + "401": { |
| 1457 | + "$ref": "#/components/responses/401-unauthorized" |
| 1458 | + }, |
| 1459 | + "404": { |
| 1460 | + "$ref": "#/components/responses/404-object-by-id-not-found" |
| 1461 | + } |
| 1462 | + }, |
| 1463 | + "standard_delete": { |
| 1464 | + "204": { |
| 1465 | + "description": "Resource successfully deleted" |
| 1466 | + } |
| 1467 | + } |
| 1468 | + }, |
| 1469 | + "parameters": { |
| 1470 | + "standard_pagination": { |
| 1471 | + "page_offset": { |
| 1472 | + "$ref": "#/components/parameters/page-offset" |
| 1473 | + }, |
| 1474 | + "page_size": { |
| 1475 | + "$ref": "#/components/parameters/page-size" |
| 1476 | + } |
| 1477 | + } |
| 1478 | + }, |
| 1479 | + "operations": { |
| 1480 | + "standard_delete": { |
| 1481 | + "responses": { |
| 1482 | + "$ref": "#/components/responses/standard_delete" |
| 1483 | + }, |
| 1484 | + "security": { |
| 1485 | + "$ref": "#/components/security_requirements/standard_auth" |
| 1486 | + } |
| 1487 | + } |
1446 | 1488 | } |
1447 | 1489 | }, |
1448 | 1490 | "security": [ |
|
0 commit comments