Testing the addition of the author in the message listing (page 184) fails to load messages as the /api/messages body spec (originally defined on page 109) omits an author spec along the lines of (s/nilable string?)
Apologies if I have missed a step somewhere, is there a reference repo to check things like this against?
That version of the project will be under guestbook-author-2.
I’m surprised that the endpoint fails to load messages for you. Since we’re using spec-coercion, and clojure.spec is open, it should load extra keys without issue as long as the specced keys conform. We’ll add a note to that section mentioning this, and we’ll expand the spec coverage later in the book.
In the meantime, could you send the error you’re experiencing?
I went back in my history to get the error to post and I can’t reproduce it.
I’m not sure how I managed to get a spec error, but it appears to have been my mistake.
Sorry for the false error.
P.S. really enjoying the book so far. I’m a clojure beginner and a complete web-dev noob but the book is still accessible to me.