Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Implementation of API for Update function is not clear #227

@rupakg

Description

@rupakg

So, the Update function API takes a functionId in the url and in the request body. I thought the reason why you needed it twice was due to the fact that you will use the functionId from the url to 'get' the function but will use the functionId value from the request to 'update' the name. But that is not the case:

curl -X PUT http://localhost:8056/v1/functions/getUser \
  -d '{
	"functionId": "getUser1", 
	"provider": {
		"type": "awslambda",
		"arn": "arn:aws:lambda:us-east-1:063733696545:function:user-service-prod-getUserUpdated", 
		"region": "us-east-1"
	}
}'

# response
{
    "functionId": "getUser",
    "provider": {
        "type": "awslambda",
        "arn": "arn:aws:lambda:us-east-1:063733696545:function:user-service-prod-getUserUpdated",
        "region": "us-east-1"
    }
}

So my questions are:

  • Can the functionId be updated?
  • If functionId cannot be updated, then why do we need to pass in functionId in the request body?

Please explain what the intended functionality is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions