slalombuild / blackslope.net

.Net Core reference architecture
MIT License
52 stars 23 forks source link

Validator mismatch #23

Open pstahmer opened 4 years ago

pstahmer commented 4 years ago

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"
  }]
}
jusexton commented 4 years ago

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

jusexton commented 4 years ago

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