diff --git a/docs/openapi/openapi-iam.yaml b/docs/openapi/openapi-iam.yaml index 0b8e823e4..47d5c7999 100644 --- a/docs/openapi/openapi-iam.yaml +++ b/docs/openapi/openapi-iam.yaml @@ -4428,7 +4428,7 @@ content: application/json: schema: - $ref: '#/components/schemas/AddUserResponse' + $ref: '#/components/schemas/AddResponse' security: - ApiAuthorization: [] x-amazon-apigateway-integration: @@ -9588,12 +9588,6 @@ username: type: string description: Username of user - AddUserResponse: - type: object - properties: - userId: - type: string - description: User Identifier User: type: object properties: diff --git a/docs/openapi/openapi-jwt.yaml b/docs/openapi/openapi-jwt.yaml index 5f56030a7..243beab83 100644 --- a/docs/openapi/openapi-jwt.yaml +++ b/docs/openapi/openapi-jwt.yaml @@ -4428,7 +4428,7 @@ content: application/json: schema: - $ref: '#/components/schemas/AddUserResponse' + $ref: '#/components/schemas/AddResponse' security: - ApiAuthorization: [] x-amazon-apigateway-integration: @@ -9588,12 +9588,6 @@ username: type: string description: Username of user - AddUserResponse: - type: object - properties: - userId: - type: string - description: User Identifier User: type: object properties: diff --git a/docs/openapi/openapi-key.yaml b/docs/openapi/openapi-key.yaml index 1691b1256..9bd3bdc7c 100644 --- a/docs/openapi/openapi-key.yaml +++ b/docs/openapi/openapi-key.yaml @@ -4428,7 +4428,7 @@ content: application/json: schema: - $ref: '#/components/schemas/AddUserResponse' + $ref: '#/components/schemas/AddResponse' security: - ApiAuthorization: [] x-amazon-apigateway-integration: @@ -9588,12 +9588,6 @@ username: type: string description: Username of user - AddUserResponse: - type: object - properties: - userId: - type: string - description: User Identifier User: type: object properties: diff --git a/lambda-api-graalvm/src/main/resources/cloudformation/openapi-iam.yaml b/lambda-api-graalvm/src/main/resources/cloudformation/openapi-iam.yaml index 4715ead1b..9e23f81d7 100644 --- a/lambda-api-graalvm/src/main/resources/cloudformation/openapi-iam.yaml +++ b/lambda-api-graalvm/src/main/resources/cloudformation/openapi-iam.yaml @@ -4456,7 +4456,7 @@ Resources: content: application/json: schema: - "$ref": "#/components/schemas/AddUserResponse" + "$ref": "#/components/schemas/AddResponse" security: - ApiAuthorization: [] x-amazon-apigateway-integration: @@ -9674,12 +9674,6 @@ Resources: username: type: "string" description: "Username of user" - AddUserResponse: - type: "object" - properties: - userId: - type: "string" - description: "User Identifier" User: type: "object" properties: diff --git a/lambda-api-graalvm/src/main/resources/cloudformation/openapi-jwt.yaml b/lambda-api-graalvm/src/main/resources/cloudformation/openapi-jwt.yaml index 33b178dd1..3a916ce90 100644 --- a/lambda-api-graalvm/src/main/resources/cloudformation/openapi-jwt.yaml +++ b/lambda-api-graalvm/src/main/resources/cloudformation/openapi-jwt.yaml @@ -4456,7 +4456,7 @@ Resources: content: application/json: schema: - "$ref": "#/components/schemas/AddUserResponse" + "$ref": "#/components/schemas/AddResponse" security: - ApiAuthorization: [] x-amazon-apigateway-integration: @@ -9674,12 +9674,6 @@ Resources: username: type: "string" description: "Username of user" - AddUserResponse: - type: "object" - properties: - userId: - type: "string" - description: "User Identifier" User: type: "object" properties: diff --git a/lambda-api-graalvm/src/main/resources/cloudformation/openapi-key.yaml b/lambda-api-graalvm/src/main/resources/cloudformation/openapi-key.yaml index 729315d02..7f82456e1 100644 --- a/lambda-api-graalvm/src/main/resources/cloudformation/openapi-key.yaml +++ b/lambda-api-graalvm/src/main/resources/cloudformation/openapi-key.yaml @@ -4456,7 +4456,7 @@ Resources: content: application/json: schema: - "$ref": "#/components/schemas/AddUserResponse" + "$ref": "#/components/schemas/AddResponse" security: - ApiAuthorization: [] x-amazon-apigateway-integration: @@ -9674,12 +9674,6 @@ Resources: username: type: "string" description: "Username of user" - AddUserResponse: - type: "object" - properties: - userId: - type: "string" - description: "User Identifier" User: type: "object" properties: diff --git a/lambda-api/src/main/java/com/formkiq/stacks/api/handler/UserRequestHandler.java b/lambda-api/src/main/java/com/formkiq/stacks/api/handler/UserRequestHandler.java index 670ba4e68..e61a41e1d 100644 --- a/lambda-api/src/main/java/com/formkiq/stacks/api/handler/UserRequestHandler.java +++ b/lambda-api/src/main/java/com/formkiq/stacks/api/handler/UserRequestHandler.java @@ -54,7 +54,7 @@ public ApiRequestHandlerResponse get(final LambdaLogger logger, final ApiGatewayRequestEvent event, final ApiAuthorization authorization, final AwsServiceCache awsservice) throws Exception { - String username = event.getQueryStringParameter("username"); + String username = event.getPathParameters().get("username"); CognitoIdentityProviderService service = awsservice.getExtension(CognitoIdentityProviderService.class); @@ -82,7 +82,7 @@ public ApiRequestHandlerResponse delete(final LambdaLogger logger, CognitoIdentityProviderService service = awsservice.getExtension(CognitoIdentityProviderService.class); - String username = event.getQueryStringParameter("username"); + String username = event.getPathParameters().get("username"); service.deleteUser(username); ApiMapResponse resp = diff --git a/lambda-api/src/main/java/com/formkiq/stacks/api/handler/UsersRequestHandler.java b/lambda-api/src/main/java/com/formkiq/stacks/api/handler/UsersRequestHandler.java index 2b21dd813..6a4135edd 100644 --- a/lambda-api/src/main/java/com/formkiq/stacks/api/handler/UsersRequestHandler.java +++ b/lambda-api/src/main/java/com/formkiq/stacks/api/handler/UsersRequestHandler.java @@ -93,7 +93,7 @@ public ApiRequestHandlerResponse post(final LambdaLogger logger, service.addUser(username, temporaryPassword, Boolean.FALSE); ApiMapResponse resp = - new ApiMapResponse(Map.of("message", "user '" + username + " has been created")); + new ApiMapResponse(Map.of("message", "user '" + username + "' has been created")); return new ApiRequestHandlerResponse(SC_CREATED, resp); }