vercel / cosmosdb-server

A Cosmos DB server implementation for testing your applications locally.
MIT License
173 stars 30 forks source link

Is server do not support patch operation? #92

Open yusa-imit opened 1 year ago

yusa-imit commented 1 year ago

I've got no route error when functions with patch operation like below was triggered.


container
    .item('some_id')
    .patch([{
        op: 'add',
        path: '/some_paths',
        value: 'some_value'
    }])

Patch operation is this https://learn.microsoft.com/en-us/azure/cosmos-db/partial-document-update

Full response was like this

{
      code: 400,
      body: { message: 'no route' },
      headers: {
        'content-type': 'application/json',
        'content-location': 'https://localhost:8081/dbs/next-auth/colls/users/docs/15b91394-2982-409f-8f71-024f4594872c',
        connection: 'close',
        'x-ms-activity-id': '8e4f9947-c8bc-4ba4-a624-42a169fbdb14',
        'x-ms-request-charge': '1',
        date: 'Wed, 01 Feb 2023 18:03:57 GMT',
        'content-length': '22',
        'x-ms-throttle-retry-count': 0,
        'x-ms-throttle-retry-wait-time-ms': 0
      },
      activityId: '8e4f9947-c8bc-4ba4-a624-42a169fbdb14'
    }
yusa-imit commented 1 year ago

And also, Offset-Limit clause is not implemented right?