Skip to content

Commit 58a69f3

Browse files
feat(mongodb): fix typo the CreateUser url (#727)
Co-authored-by: Laure-di <62625835+Laure-di@users.noreply.github.com>
1 parent 323accf commit 58a69f3

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

scaleway-async/scaleway_async/mongodb/v1alpha1/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,11 +1103,10 @@ async def create_user(
11031103
"region", region or self.client.default_region
11041104
)
11051105
param_instance_id = validate_path_param("instance_id", instance_id)
1106-
param_name = validate_path_param("name", name)
11071106

11081107
res = self._request(
11091108
"POST",
1110-
f"/mongodb/v1alpha1/regions/{param_region}/instances/{param_instance_id}/users/{param_name}",
1109+
f"/mongodb/v1alpha1/regions/{param_region}/instances/{param_instance_id}/users",
11111110
body=marshal_CreateUserRequest(
11121111
CreateUserRequest(
11131112
instance_id=instance_id,

scaleway-async/scaleway_async/mongodb/v1alpha1/marshalling.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,9 @@ def marshal_CreateUserRequest(
715715
) -> Dict[str, Any]:
716716
output: Dict[str, Any] = {}
717717

718+
if request.name is not None:
719+
output["name"] = request.name
720+
718721
if request.password is not None:
719722
output["password"] = request.password
720723

scaleway/scaleway/mongodb/v1alpha1/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,11 +1099,10 @@ def create_user(
10991099
"region", region or self.client.default_region
11001100
)
11011101
param_instance_id = validate_path_param("instance_id", instance_id)
1102-
param_name = validate_path_param("name", name)
11031102

11041103
res = self._request(
11051104
"POST",
1106-
f"/mongodb/v1alpha1/regions/{param_region}/instances/{param_instance_id}/users/{param_name}",
1105+
f"/mongodb/v1alpha1/regions/{param_region}/instances/{param_instance_id}/users",
11071106
body=marshal_CreateUserRequest(
11081107
CreateUserRequest(
11091108
instance_id=instance_id,

scaleway/scaleway/mongodb/v1alpha1/marshalling.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,9 @@ def marshal_CreateUserRequest(
715715
) -> Dict[str, Any]:
716716
output: Dict[str, Any] = {}
717717

718+
if request.name is not None:
719+
output["name"] = request.name
720+
718721
if request.password is not None:
719722
output["password"] = request.password
720723

0 commit comments

Comments
 (0)