Skip to content

@id and id negotiation#191

Merged
thehabes merged 40 commits intomainfrom
134-at-and-context
Apr 15, 2025
Merged

@id and id negotiation#191
thehabes merged 40 commits intomainfrom
134-at-and-context

Conversation

@thehabes
Copy link
Copy Markdown
Member

@thehabes thehabes commented Apr 2, 2025

Negotiate around @id and id for objects returned in the response body to clients. Protect the id property during API logic where necessary. Allow user to supply a valid _id with which to create objects.

Add a new route, PUT /bulkUpdate

Add new route to API.html. Document the performance improvement allowing /bulkUpdate and /bulkCreate to occur as an 'unordered' bulkWrite() Mongo operation.

Fix up error reporting, esp. to make sure the 409 for duplicate _id is handled and reported correctly.

Add tests for id negotiation and bulkUpdate.

npm audit fix because it has been a while.

Bring in Dependabot fix #193

@thehabes thehabes marked this pull request as ready for review April 4, 2025 14:14
@thehabes thehabes requested a review from cubap as a code owner April 4, 2025 14:14
@thehabes thehabes marked this pull request as draft April 10, 2025 15:06
Copy link
Copy Markdown
Member

@cubap cubap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just comments. I'll poke more tomorrow.

Comment thread db-controller.js
Comment thread db-controller.js Outdated
Comment thread db-controller.js Outdated
Comment thread db-controller.js Outdated
Comment thread db-controller.js Outdated
thehabes and others added 5 commits April 15, 2025 09:20
Bumps [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) from 7.23.5 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-helpers)

---
updated-dependencies:
- dependency-name: "@babel/helpers"
  dependency-version: 7.27.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@thehabes thehabes marked this pull request as ready for review April 15, 2025 16:22
Comment thread public/API.html
<p>
Update multiple existing RERUM objects at once and recieve an array of the complete records as the response body.
Accepts only a single array of JSON objects in the request body. The '@id' property must be present for each object.
In cases where the Linked Data @context property maps '@id' to 'id' either of these properties will be sufficient.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, this is true in spirit

@cubap
Copy link
Copy Markdown
Member

cubap commented Apr 15, 2025

tests pass. It looks right. I did not set up a messy local db to test it with, but it doesn't break current functionality, so I accept it.

@thehabes thehabes merged commit b55cecd into main Apr 15, 2025
3 checks passed
@thehabes thehabes deleted the 134-at-and-context branch April 15, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants