Skip to content

Do not send field when in url #204

@cubistico

Description

@cubistico

I'm trying to use RESTool with an API that, when creating a new user, requires a PUT request with the new user name in the URL.

Now if I define

        "post": {
          "actualMethod": "put",
          "url": "/users/:username",
          "fields": [
            {
              "name": "username",
              "type": "text",
              "label": "User name"
            },
            {
              "name": "password",
              "type": "text",
              "label": "Password"
            }
          ]
        }

the server returns an error because the field is not expected in the body. However, if I don't define it in "fields", the UI will not generate a corresponding input field.

A possible solution would be exclude the field from the body if it is already part of the url.

Perhaps there is a solution with custom fields, but if so, I don't know how to use them for an "Add Item" functionality.

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