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

Validator mismatch #23

Open
pstahmer opened this issue Nov 18, 2019 · 2 comments
Open

Validator mismatch #23

pstahmer opened this issue Nov 18, 2019 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@pstahmer
Copy link

The PUT request for movies currently returns an error which describes the title field when the description is invalid.

Also, much of the seed data in the DB has descriptions which exceed the PUT endpoint's description length limits.

Sample Payload

{
  "id":1,
  "title":"The Shawshank Redemption",
  "description":"Lorem ipsum dolor sit amet, ut consul soluta persius quo, et eam mundi scribentur, eros invidunt dissentias no eum.",
  "releaseDate":"2019-01-14"
}

Sample response:

{
  "data": {
    "id": 1,
    "movie": {
      "id": 1,
      "title": "The Shawshank Redemption",
      "description": "Lorem ipsum dolor sit amet, ut consul soluta persius quo, et eam mundi scribentur, eros invidunt dissentias no eum.",
      "releaseDate": "2019-01-14T00:00:00"
    }
  },
  "errors": [{
    "code": 40005,
    "message": "Movie Title should be between 2 and 50 characters"
  }]
}
@pmotameni pmotameni added bug Something isn't working help wanted Extra attention is needed labels Jun 28, 2020
@jusexton
Copy link
Contributor

jusexton commented Aug 25, 2020

Looks like this issue also included POST operations. I raised a fix for this. Let me know what you guys think! #37

@jusexton
Copy link
Contributor

This issue remains open because of the out of range database seed data I am assuming?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants