diff options
author | Joas Schilling <coding@schilljs.com> | 2022-11-23 12:12:37 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-11-23 15:16:39 +0100 |
commit | 94866a460e37cde7bbc59f9e022dd505e2860488 (patch) | |
tree | 884ad164a9b93ae25a3412ef6f83d8f9d0441b7c /appinfo/routes/routesRoomController.php | |
parent | 7eeff4d013c828183f80c32cfe39441369aa6d16 (diff) |
Move all API version requirements to the same format
This allows better parsing for OpenAPI specs later
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'appinfo/routes/routesRoomController.php')
-rw-r--r-- | appinfo/routes/routesRoomController.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/appinfo/routes/routesRoomController.php b/appinfo/routes/routesRoomController.php index 52731d383..3cc483c01 100644 --- a/appinfo/routes/routesRoomController.php +++ b/appinfo/routes/routesRoomController.php @@ -24,12 +24,12 @@ declare(strict_types=1); */ $requirements = [ - 'apiVersion' => 'v(4)', + 'apiVersion' => 'v4', ]; $requirementsWithToken = [ - 'apiVersion' => 'v(4)', - 'token' => '^[a-z0-9]{4,30}$', + 'apiVersion' => 'v4', + 'token' => '[a-z0-9]{4,30}', ]; return [ @@ -60,7 +60,7 @@ return [ ['name' => 'Room#setPassword', 'url' => '/api/{apiVersion}/room/{token}/password', 'verb' => 'PUT', 'requirements' => $requirementsWithToken], /** @see \OCA\Talk\Controller\RoomController::setPermissions() */ ['name' => 'Room#setPermissions', 'url' => '/api/{apiVersion}/room/{token}/permissions/{mode}', 'verb' => 'PUT', 'requirements' => array_merge($requirementsWithToken, [ - 'mode' => '^(call|default)$', + 'mode' => '(call|default)', ])], /** @see \OCA\Talk\Controller\RoomController::getParticipants() */ ['name' => 'Room#getParticipants', 'url' => '/api/{apiVersion}/room/{token}/participants', 'verb' => 'GET', 'requirements' => $requirementsWithToken], @@ -90,7 +90,7 @@ return [ ['name' => 'Room#removeFromFavorites', 'url' => '/api/{apiVersion}/room/{token}/favorite', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken], /** @see \OCA\Talk\Controller\RoomController::getParticipantByDialInPin() */ ['name' => 'Room#getParticipantByDialInPin', 'url' => '/api/{apiVersion}/room/{token}/pin/{pin}', 'verb' => 'GET', 'requirements' => array_merge($requirementsWithToken, [ - 'pin' => '^\d{7,32}$', + 'pin' => '\d{7,32}', ])], /** @see \OCA\Talk\Controller\RoomController::createGuestByDialIn() */ ['name' => 'Room#createGuestByDialIn', 'url' => '/api/{apiVersion}/room/{token}/open-dial-in', 'verb' => 'POST', 'requirements' => $requirementsWithToken], |