Skip to content

Invalid JSON attributes still work #101

Description

@lroellin

We need to check the request against a known schema before proceeding with them.

The following works (unfortunately):

  1. Send a Create a new expense request, but omit the "title" attribute.
  2. Observe that
  • The request succeeds
  • When Getting an expense with the received ID, the title is empty
  • It is actually empty in the database
  • The value of that attribute in the DTO class is actually null.

Suggested fix:
Create a schema we can check against.
or
Create a instance method checking all fields are populated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions