Skip to content

Creating namespace via API with no id will create a row with empty id #126

@mabdh

Description

@mabdh

Describe the bug
Creating namespace via API with body contains only name (the id was not passed). This will create a row in table namespaces and return response with empty id.

To Reproduce
Steps to reproduce the behavior:
1.

curl --location --request POST 'http://localhost:8000/admin/v1beta1/namespaces' \
--header 'X-Shield-Email: user@odpf.io' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "req ns"
}'
  1. Response got
{
    "namespace": {
        "id": "",
        "name": "req ns",
        "createdAt": "2022-07-22T06:02:34.396844Z",
        "updatedAt": "2022-07-22T06:02:34.396844Z"
    }
}
  1. Row in namespaces table

Screen Shot 2022-07-22 at 14 00 12

Expected behavior
ID in table row should not be empty

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions