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

Invalid JSON attributes still work #101

Open
lroellin opened this issue Jun 12, 2017 · 0 comments
Open

Invalid JSON attributes still work #101

lroellin opened this issue Jun 12, 2017 · 0 comments
Labels

Comments

@lroellin
Copy link
Member

lroellin commented Jun 12, 2017

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.

@lroellin lroellin added the bug label Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant