Skip to content

Make Namespace Optional for Request and/or Response #43

@dkocic

Description

@dkocic

At this moment the use of namespace on model is mandatory. In addition, the namespace is shared between both request and response.
It can happen that in some cases you don't want to wrap request or response

Lets say that you make a request with json presented bellow

{
  "user": {
    "email": "user@example.com",
    "password": "Password1"
  }
}

the expected response is parsed to object only if it is wrapped in the same namespace

{
  "user": {
    "id": 1,
    "email": "user@example.com"
  }
}

desired behavior would work also with the following response

{
  "id": 1,
  "email": "user@example.com"
}

The same thing is valid for unwrapped requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions