|
956 | 956 | "webhooks": {}, |
957 | 957 | "components": { |
958 | 958 | "schemas": { |
959 | | - "tea_product": { |
| 959 | + "base_product_fields": { |
960 | 960 | "type": "object", |
961 | 961 | "properties": { |
962 | | - "identifier": { |
963 | | - "$ref": "#/components/schemas/type_uuid" |
964 | | - }, |
965 | 962 | "product_name": { |
966 | 963 | "type": "string" |
967 | 964 | }, |
968 | | - "purl": { |
969 | | - "type": "string", |
970 | | - "description": "Package URL (PURL)" |
971 | | - }, |
972 | 965 | "barcode": { |
973 | 966 | "type": "string", |
974 | 967 | "description": "Barcode" |
|
981 | 974 | "$ref": "#/components/schemas/type_uuid", |
982 | 975 | "description": "Vendor UUID" |
983 | 976 | }, |
984 | | - "leaf_references": { |
985 | | - "type": "array", |
986 | | - "items": { |
987 | | - "$ref": "#/components/schemas/type_uuid" |
988 | | - }, |
989 | | - "description": "Array of UUIDs referencing TEA Leaf entries" |
| 977 | + "purl": { |
| 978 | + "type": "string", |
| 979 | + "description": "Package URL (PURL)" |
| 980 | + } |
| 981 | + } |
| 982 | + }, |
| 983 | + "base_versioned_product": { |
| 984 | + "allOf": [ |
| 985 | + { "$ref": "#/components/schemas/base_product_fields" }, |
| 986 | + { |
| 987 | + "type": "object", |
| 988 | + "properties": { |
| 989 | + "product_version": { |
| 990 | + "type": "string" |
| 991 | + }, |
| 992 | + "release_date": { |
| 993 | + "type": "string", |
| 994 | + "format": "date-time", |
| 995 | + "example": "2024-03-20T15:30:00Z" |
| 996 | + } |
| 997 | + } |
990 | 998 | } |
991 | | - }, |
992 | | - "required": [ |
993 | | - "identifier", |
994 | | - "product_name" |
995 | 999 | ] |
996 | 1000 | }, |
997 | | - "tea_leaf": { |
| 1001 | + "base_artifact_object": { |
998 | 1002 | "type": "object", |
999 | 1003 | "properties": { |
1000 | 1004 | "identifier": { |
1001 | 1005 | "$ref": "#/components/schemas/type_uuid" |
1002 | 1006 | }, |
1003 | | - "product_name": { |
| 1007 | + "description": { |
1004 | 1008 | "type": "string" |
1005 | 1009 | }, |
1006 | | - "product_version": { |
| 1010 | + "mime_type": { |
1007 | 1011 | "type": "string" |
1008 | 1012 | }, |
1009 | | - "release_date": { |
| 1013 | + "artifact_url": { |
1010 | 1014 | "type": "string", |
1011 | | - "format": "date-time", |
1012 | | - "example": "2024-03-20T15:30:00Z" |
| 1015 | + "format": "uri" |
1013 | 1016 | }, |
1014 | | - "pre_release": { |
1015 | | - "type": "boolean" |
| 1017 | + "artifact_size_in_bytes": { |
| 1018 | + "type": "integer", |
| 1019 | + "format": "int64" |
1016 | 1020 | }, |
1017 | | - "end_of_life": { |
| 1021 | + "artifact_checksum": { |
1018 | 1022 | "type": "string", |
1019 | | - "format": "date-time", |
1020 | | - "example": "2024-03-20T15:30:00Z" |
| 1023 | + "description": "The checksum value" |
1021 | 1024 | }, |
1022 | | - "collection_references": { |
1023 | | - "type": "array", |
1024 | | - "items": { |
1025 | | - "$ref": "#/components/schemas/type_uuid" |
| 1025 | + "artifact_checksum_type": { |
| 1026 | + "type": "string", |
| 1027 | + "description": "The algorithm used to generate the checksum", |
| 1028 | + "enum": [ |
| 1029 | + "SHA512", |
| 1030 | + "SHA384", |
| 1031 | + "SHA256", |
| 1032 | + "SHA224", |
| 1033 | + "SHA1", |
| 1034 | + "MD5", |
| 1035 | + "BLAKE2b-512", |
| 1036 | + "BLAKE2s-256", |
| 1037 | + "BLAKE3" |
| 1038 | + ], |
| 1039 | + "default": "SHA256" |
| 1040 | + } |
| 1041 | + } |
| 1042 | + }, |
| 1043 | + "tea_product": { |
| 1044 | + "allOf": [ |
| 1045 | + { "$ref": "#/components/schemas/base_product_fields" }, |
| 1046 | + { |
| 1047 | + "type": "object", |
| 1048 | + "properties": { |
| 1049 | + "identifier": { |
| 1050 | + "$ref": "#/components/schemas/type_uuid" |
| 1051 | + }, |
| 1052 | + "leaf_references": { |
| 1053 | + "type": "array", |
| 1054 | + "items": { |
| 1055 | + "$ref": "#/components/schemas/type_uuid" |
| 1056 | + }, |
| 1057 | + "description": "Array of UUIDs referencing TEA Leaf entries" |
| 1058 | + } |
1026 | 1059 | }, |
1027 | | - "description": "Array of UUIDs referencing TEA Collection entries", |
1028 | | - "default": [] |
| 1060 | + "required": ["identifier", "product_name"] |
| 1061 | + } |
| 1062 | + ] |
| 1063 | + }, |
| 1064 | + "tea_leaf": { |
| 1065 | + "allOf": [ |
| 1066 | + { "$ref": "#/components/schemas/base_versioned_product" }, |
| 1067 | + { |
| 1068 | + "type": "object", |
| 1069 | + "properties": { |
| 1070 | + "identifier": { |
| 1071 | + "$ref": "#/components/schemas/type_uuid" |
| 1072 | + }, |
| 1073 | + "pre_release": { |
| 1074 | + "type": "boolean" |
| 1075 | + }, |
| 1076 | + "end_of_life": { |
| 1077 | + "type": "string", |
| 1078 | + "format": "date-time" |
| 1079 | + }, |
| 1080 | + "collection_references": { |
| 1081 | + "type": "array", |
| 1082 | + "items": { |
| 1083 | + "$ref": "#/components/schemas/type_uuid" |
| 1084 | + }, |
| 1085 | + "description": "Array of UUIDs referencing TEA Collection entries", |
| 1086 | + "default": [] |
| 1087 | + } |
| 1088 | + }, |
| 1089 | + "required": [ |
| 1090 | + "identifier", |
| 1091 | + "product_name", |
| 1092 | + "product_version", |
| 1093 | + "release_date", |
| 1094 | + "pre_release" |
| 1095 | + ] |
1029 | 1096 | } |
1030 | | - }, |
1031 | | - "required": [ |
1032 | | - "identifier", |
1033 | | - "product_name", |
1034 | | - "product_version", |
1035 | | - "release_date", |
1036 | | - "pre_release" |
1037 | 1097 | ] |
1038 | 1098 | }, |
1039 | 1099 | "tea_collection": { |
|
1325 | 1385 | } |
1326 | 1386 | }, |
1327 | 1387 | "responses": { |
| 1388 | + "base_error": { |
| 1389 | + "type": "object", |
| 1390 | + "properties": { |
| 1391 | + "error": { |
| 1392 | + "type": "string" |
| 1393 | + }, |
| 1394 | + "message": { |
| 1395 | + "type": "string" |
| 1396 | + } |
| 1397 | + } |
| 1398 | + }, |
1328 | 1399 | "404-object-by-id-not-found": { |
1329 | 1400 | "description": "Object requested by identifier not found", |
1330 | 1401 | "content": { |
|
0 commit comments