|
367 | 367 | "properties": { |
368 | 368 | "$stashID": { |
369 | 369 | "type": "string", |
370 | | - "description": "ID of the stash whose data should be used", |
| 370 | + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", |
| 371 | + "description": "ID of the stash, e.g., `20240215-job32`", |
371 | 372 | "example": "20240215-job32" |
372 | 373 | } |
373 | 374 | }, |
|
695 | 696 | "properties": { |
696 | 697 | "$stashID": { |
697 | 698 | "type": "string", |
698 | | - "description": "ID of the stash whose data should be used", |
| 699 | + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", |
| 700 | + "description": "ID of the stash, e.g., `20240215-job32`", |
699 | 701 | "example": "20240215-job32" |
700 | 702 | } |
701 | 703 | }, |
|
924 | 926 | "properties": { |
925 | 927 | "$stashID": { |
926 | 928 | "type": "string", |
927 | | - "description": "ID of the stash whose data should be used", |
| 929 | + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", |
| 930 | + "description": "ID of the stash, e.g., `20240215-job32`", |
928 | 931 | "example": "20240215-job32" |
929 | 932 | } |
930 | 933 | }, |
|
941 | 944 | } |
942 | 945 | } |
943 | 946 | }, |
944 | | - "/stashes": { |
945 | | - "post": { |
946 | | - "responses": { |
947 | | - "200": { |
948 | | - "description": "", |
949 | | - "content": { |
950 | | - "application/json": { |
951 | | - "schema": { |
952 | | - "type": "object", |
953 | | - "properties": { |
954 | | - "data": { |
955 | | - "type": "object", |
956 | | - "properties": { |
957 | | - "stashID": { |
958 | | - "type": "string", |
959 | | - "description": "The newly created stash" |
960 | | - } |
961 | | - }, |
962 | | - "required": [ |
963 | | - "stashID" |
964 | | - ], |
965 | | - "additionalProperties": false |
966 | | - } |
967 | | - }, |
968 | | - "required": [ |
969 | | - "data" |
970 | | - ], |
971 | | - "additionalProperties": false |
972 | | - } |
973 | | - } |
974 | | - } |
975 | | - }, |
976 | | - "400": { |
977 | | - "description": "", |
978 | | - "content": { |
979 | | - "application/json": { |
980 | | - "schema": { |
981 | | - "type": "object", |
982 | | - "properties": { |
983 | | - "error": { |
984 | | - "type": "object", |
985 | | - "properties": { |
986 | | - "type": { |
987 | | - "type": "string" |
988 | | - }, |
989 | | - "message": { |
990 | | - "type": "string" |
991 | | - } |
992 | | - }, |
993 | | - "required": [ |
994 | | - "type", |
995 | | - "message" |
996 | | - ], |
997 | | - "additionalProperties": false |
998 | | - } |
999 | | - }, |
1000 | | - "required": [ |
1001 | | - "error" |
1002 | | - ], |
1003 | | - "additionalProperties": false |
1004 | | - } |
1005 | | - } |
1006 | | - } |
1007 | | - } |
1008 | | - }, |
1009 | | - "operationId": "Create stash", |
1010 | | - "requestBody": { |
1011 | | - "content": { |
1012 | | - "application/json": { |
1013 | | - "schema": { |
1014 | | - "type": "object", |
1015 | | - "properties": {}, |
1016 | | - "additionalProperties": false |
1017 | | - } |
1018 | | - } |
1019 | | - } |
1020 | | - } |
1021 | | - } |
1022 | | - }, |
1023 | 947 | "/stashes/{stashID}/{serial}": { |
1024 | | - "post": { |
| 948 | + "put": { |
1025 | 949 | "responses": { |
1026 | 950 | "200": { |
1027 | 951 | "description": "", |
|
1069 | 993 | } |
1070 | 994 | } |
1071 | 995 | }, |
1072 | | - "description": "Adds data to a stash", |
| 996 | + "description": "Sets the content of a chunk of data inside a stash", |
1073 | 997 | "parameters": [ |
1074 | 998 | { |
1075 | 999 | "name": "stashID", |
1076 | 1000 | "in": "path", |
1077 | 1001 | "schema": { |
1078 | 1002 | "type": "string", |
1079 | | - "description": "ID of the stash to add data to, e.g., `20240215-job32`", |
| 1003 | + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", |
| 1004 | + "description": "ID of the stash. The stash will be created if it doesn't already exist.", |
1080 | 1005 | "example": "20240215-job32" |
1081 | 1006 | }, |
1082 | 1007 | "required": true |
|
1086 | 1011 | "in": "path", |
1087 | 1012 | "schema": { |
1088 | 1013 | "type": "string", |
1089 | | - "description": "Serial identifier of the chunk of data to add to the stash. Chunks will be assembled in the sort order of their serials, so utilize ordered identifiers for each chunk if a specific ordering of data is required, e.g., `1`, `2`, etc...\nIf the order of data is not important, random, but unique, values can be used, e.g., `c2a4567`." |
| 1014 | + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", |
| 1015 | + "description": "Serial identifier of the chunk of data to set in the stash. If a chunk has already been sent with the same serial, its data will be overwritten. Chunks will be assembled in the sort order of their serials, so utilize ordered identifiers for each chunk if a specific ordering of data in the stash is desired, e.g., `1`, `2`, etc...\nIf the order of data is not important, random, but unique, values can be used, e.g., `c2a4567`.", |
| 1016 | + "example": "1" |
1090 | 1017 | }, |
1091 | 1018 | "required": true |
1092 | 1019 | } |
|
1170 | 1097 | } |
1171 | 1098 | } |
1172 | 1099 | }, |
1173 | | - "description": "Deletes a stash and its data", |
| 1100 | + "description": "Deletes a stash and all its data", |
1174 | 1101 | "parameters": [ |
1175 | 1102 | { |
1176 | 1103 | "name": "stashID", |
1177 | 1104 | "in": "path", |
1178 | 1105 | "schema": { |
1179 | 1106 | "type": "string", |
1180 | | - "description": "ID of the stash to delete, e.g., `20240215-job32`", |
| 1107 | + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$", |
| 1108 | + "description": "ID of the stash, e.g., `20240215-job32`", |
1181 | 1109 | "example": "20240215-job32" |
1182 | 1110 | }, |
1183 | 1111 | "required": true |
|
0 commit comments