Skip to content

DELETE /rest/resource errors out with SQL syntax error #40

@JayJamieson

Description

@JayJamieson

Describe the bug

I believe with the introduction of external data sources PR DELETE requests using the Literest endpoint is broken.

Following error output is observed

HTTP/1.1 500 Internal Server Error
Transfer-Encoding: chunked
Content-Type: application/json
Content-Encoding: gzip

{
  "error": "SQL_PARSE_ERROR: SQL string could not be parsed: syntax error around L1:21: `.1`"
}

I believe this is down to the path parsing here, when a pk path parameter is provided it treats it as schema being provided.

To Reproduce

  1. Create a simple users table create table users (id integer primary key, name text)
  2. Insert a single row insert into users (name) values ('Jay Jamieson')
  3. Run the following DELETE request from documentation
curl --location --request DELETE 'http://127.0.0.1:8787/rest/users/1' \
--header 'Authorization: Bearer ABC123'

Expected behavior

Resource is deleted by provided resource PK ID per the current documentation.

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