Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST /register should normalize properties before saving them #282

Open
5 tasks
Syndesi opened this issue Apr 13, 2024 · 0 comments
Open
5 tasks

POST /register should normalize properties before saving them #282

Syndesi opened this issue Apr 13, 2024 · 0 comments
Labels
Bug Addressing unexpected issues.
Milestone

Comments

@Syndesi
Copy link
Member

Syndesi commented Apr 13, 2024

The endpoint POST /register currently copies properties directly from the user's request to the database, which might result in unwanted behavior. Instead, the provided properties should first be normalized / validated, similar to the way it is handled in the POST / and POST /<uuid> endpoints. They are currently using the service src/Service/CreateElementFromRawDataService.php.

Tasks:

  • Check if other user endpoints are also copying raw properties directly to the database. If those are found, add them to this issue.
  • Modify those endpoints to use the CreateElementFromRawDataService or similar services.
  • Update unit tests.
  • Verify that existing feature tests are working.
  • Add a new feature test, where the correct behavior can be tested? Although at this moment, no testable normalization takes place iirc - so the feature test would have to execute a database call against Neo4j directly?
@Syndesi Syndesi added the bug label Apr 13, 2024
@Syndesi Syndesi added this to the 0.2.0 milestone Apr 13, 2024
@Syndesi Syndesi added the Bug Addressing unexpected issues. label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Addressing unexpected issues.
Projects
Status: Todo
Development

No branches or pull requests

2 participants