|
273 | 273 | }, |
274 | 274 | "count": { |
275 | 275 | "description": "Current increment for the id number if the domain is in ID number mode. Always incremented even if not in ID mode so as to be able to swap to ID mode if requested with no risk for collision.", |
276 | | - "type": "number", |
| 276 | + "type": "integer", |
277 | 277 | "format": "int32", |
| 278 | + "minimum": 0, |
278 | 279 | "readOnly": true |
279 | 280 | }, |
280 | 281 | "hidden": { |
|
283 | 284 | }, |
284 | 285 | "hostName": { |
285 | 286 | "description": "String to be used in matching the host name. Subdomains need to have their own record to be usable.", |
286 | | - "type": "string" |
| 287 | + "type": "string", |
| 288 | + "format": "hostname" |
287 | 289 | }, |
288 | 290 | "type": { |
289 | 291 | "description": "Flag that indicates the type of shortened URL that can be generated on the domain: `vanity` allows any user structure as long as it is unique. Example: `https://example.com/myUrl`, `idNumber` locks out user control of the vanity URL and hard codes it to an ID number. Example: `https://example.com/managedLink?id=123`.", |
|
340 | 342 | "createdAt": { |
341 | 343 | "description": "Time stamp of when the assignment was created.", |
342 | 344 | "type": "string", |
343 | | - "format": "date-time" |
| 345 | + "format": "date-time", |
| 346 | + "readOnly": true |
344 | 347 | }, |
345 | 348 | "targetId": { |
346 | 349 | "description": "Unique ID of the system that this assignment describes.", |
|
467 | 470 | "description": "Check the health of the various components of the URL Shortener and report back. Useful for automated health probing.", |
468 | 471 | "operationId": "/Api/Core/Health/Get", |
469 | 472 | "responses": { |
470 | | - "201": { |
| 473 | + "204": { |
471 | 474 | "description": "Service is operational!" |
472 | 475 | }, |
473 | 476 | "500": { |
|
662 | 665 | "description": "Creates new URL redirect record in the database and returns information enriched with created metadata.\n\nThis endpoint does not have scope (permission) restrictions.", |
663 | 666 | "operationId": "/Api/Redirect/Post", |
664 | 667 | "requestBody": { |
| 668 | + "required": true, |
665 | 669 | "content": { |
666 | 670 | "application/json": { |
667 | 671 | "examples": { |
|
694 | 698 | } |
695 | 699 | }, |
696 | 700 | "schema": { |
697 | | - "allOf": [ |
698 | | - { |
699 | | - "$ref": "#/components/schemas/Redirect.UrlConfiguration" |
700 | | - }, |
701 | | - { |
702 | | - "required": [ |
703 | | - "sourceUrl", |
704 | | - "customUserAgentMatcher", |
705 | | - "targetUrl", |
706 | | - "targetUrlCustom", |
707 | | - "targetUrlMobile", |
708 | | - "targetUrlNodeJs", |
709 | | - "targetUrlPowershell", |
710 | | - "targetUrlPython", |
711 | | - "type" |
712 | | - ] |
713 | | - } |
714 | | - ] |
| 701 | + "$ref": "#/components/schemas/Redirect.UrlConfiguration" |
715 | 702 | } |
716 | 703 | } |
717 | 704 | } |
|
742 | 729 | "description": "Validates if provided target name is available to be requested. Returns boolean `true` if the name is available, `false` if the name is already recorded.\n\nThis endpoint does not have scope (permission) restrictions.", |
743 | 730 | "operationId": "/Api/Redirect/Check/Post", |
744 | 731 | "requestBody": { |
| 732 | + "required": true, |
745 | 733 | "content": { |
746 | 734 | "application/json": { |
747 | 735 | "examples": { |
|
763 | 751 | "description": "URL to check if is taken or not.", |
764 | 752 | "type": "string" |
765 | 753 | } |
766 | | - } |
| 754 | + }, |
| 755 | + "required": [ |
| 756 | + "sourceName" |
| 757 | + ] |
767 | 758 | } |
768 | 759 | } |
769 | 760 | } |
|
843 | 834 | } |
844 | 835 | }, |
845 | 836 | "schema": { |
846 | | - "allOf": [ |
847 | | - { |
848 | | - "$ref": "#/components/schemas/Redirect.UrlConfiguration" |
849 | | - }, |
850 | | - { |
851 | | - "required": [] |
852 | | - } |
853 | | - ] |
| 837 | + "$ref": "#/components/schemas/Redirect.UrlConfiguration" |
854 | 838 | } |
855 | 839 | } |
856 | 840 | } |
|
956 | 940 | "description": "Create new record of the banned term.\n\nThis endpoint requires the `BanList.ReadWrite.All` or `Everything.ReadWrite.All` scope (permission).", |
957 | 941 | "operationId": "/Api/BannedName/Post", |
958 | 942 | "requestBody": { |
| 943 | + "required": true, |
959 | 944 | "content": { |
960 | 945 | "application/json": { |
961 | 946 | "examples": { |
|
974 | 959 | } |
975 | 960 | }, |
976 | 961 | "schema": { |
977 | | - "allOf": [ |
978 | | - { |
979 | | - "$ref": "#/components/schemas/Redirect.BannedTerm" |
980 | | - }, |
981 | | - { |
982 | | - "required": [ |
983 | | - "name", |
984 | | - "type" |
985 | | - ] |
986 | | - } |
987 | | - ] |
| 962 | + "$ref": "#/components/schemas/Redirect.BannedTerm" |
988 | 963 | } |
989 | 964 | } |
990 | 965 | } |
|
1043 | 1018 | }, |
1044 | 1019 | "delete": { |
1045 | 1020 | "summary": "Removes Specific Banned Name Record", |
1046 | | - "description": "Deletes the banned name record from the database.\n\nThis endpoint requires the `BanList.ReadWrite.All` or `Everything.ReadWrite.All` scope (permission).", |
| 1021 | + "description": "Deletes the banned name record from the database.\n\nThis endpoint requires an RBAC assignment or the `BanList.ReadWrite.All` or `Everything.ReadWrite.All` scope (permission).", |
1047 | 1022 | "operationId": "/Api/BannedName/:id/Delete", |
1048 | 1023 | "parameters": [ |
1049 | 1024 | { |
|
1083 | 1058 | "description": "Filter by the `count` field.", |
1084 | 1059 | "schema": { |
1085 | 1060 | "type": "integer", |
1086 | | - "format": "int32" |
| 1061 | + "format": "int32", |
| 1062 | + "minimum": 0 |
1087 | 1063 | } |
1088 | 1064 | }, |
1089 | 1065 | { |
|
1145 | 1121 | "description": "Creates new domain name record in the database and returns information enriched with created metadata.\n\nThis endpoint requires the `Domain.ReadWrite.All` or `Everything.ReadWrite.All` scope (permission).", |
1146 | 1122 | "operationId": "/Api/Domain/Post", |
1147 | 1123 | "requestBody": { |
| 1124 | + "required": true, |
1148 | 1125 | "content": { |
1149 | 1126 | "application/json": { |
1150 | 1127 | "examples": { |
|
1167 | 1144 | } |
1168 | 1145 | }, |
1169 | 1146 | "schema": { |
1170 | | - "allOf": [ |
1171 | | - { |
1172 | | - "$ref": "#/components/schemas/Redirect.DomainName" |
1173 | | - }, |
1174 | | - { |
1175 | | - "required": [ |
1176 | | - "allowHttp", |
1177 | | - "count", |
1178 | | - "hidden", |
1179 | | - "hostName", |
1180 | | - "type" |
1181 | | - ] |
1182 | | - } |
1183 | | - ] |
| 1147 | + "$ref": "#/components/schemas/Redirect.DomainName" |
1184 | 1148 | } |
1185 | 1149 | } |
1186 | 1150 | } |
|
1254 | 1218 | "description": "Payload contains one or more fields that need update in the database.", |
1255 | 1219 | "value": { |
1256 | 1220 | "allowHttp": false, |
1257 | | - "count": 18, |
1258 | 1221 | "type": "idNumber" |
1259 | 1222 | } |
1260 | 1223 | } |
1261 | 1224 | }, |
1262 | 1225 | "schema": { |
1263 | | - "allOf": [ |
1264 | | - { |
1265 | | - "$ref": "#/components/schemas/Redirect.DomainName" |
1266 | | - }, |
1267 | | - { |
1268 | | - "required": [] |
1269 | | - } |
1270 | | - ] |
| 1226 | + "$ref": "#/components/schemas/Redirect.DomainName" |
1271 | 1227 | } |
1272 | 1228 | } |
1273 | 1229 | } |
|
1423 | 1379 | "description": "Create new RBAC assignment record in the database and returns information enriched with created metadata.\n\nThis endpoint does not have implicit scope (permission) restrictions but includes an internal check on user's access level.", |
1424 | 1380 | "operationId": "/Api/Rbac/Post", |
1425 | 1381 | "requestBody": { |
| 1382 | + "required": true, |
1426 | 1383 | "content": { |
1427 | 1384 | "application/json": { |
1428 | 1385 | "examples": { |
|
1446 | 1403 | } |
1447 | 1404 | }, |
1448 | 1405 | "schema": { |
1449 | | - "allOf": [ |
1450 | | - { |
1451 | | - "$ref": "#/components/schemas/Redirect.RbacAssignment" |
1452 | | - }, |
1453 | | - { |
1454 | | - "required": [ |
1455 | | - "assignmentTargetType", |
1456 | | - "targetId", |
1457 | | - "principalId", |
1458 | | - "principalType", |
1459 | | - "role" |
1460 | | - ] |
1461 | | - } |
1462 | | - ] |
| 1406 | + "$ref": "#/components/schemas/Redirect.RbacAssignment" |
1463 | 1407 | } |
1464 | 1408 | } |
1465 | 1409 | } |
|
0 commit comments