๐๐ง Haskell / Yesod
tzemanovic opened this issue ยท 5 comments
tzemanovic commented
Current Status
Codebase in progress: https://github.com/tzemanovic/haskell-yesod-realworld-example-app
Todo:
- ๐ Fork the starter repo & post the link in this issue
- ๐จ Create logo for repo & update issue status (@EricSimons)
- ๐จ Implement all of Conduit's functionality per the spec & API
- ๐ Move repo to main org & Peer review final codebase by admins/community (RFC)
- ๐ Tag v1 release and officially list it on the README!
tzemanovic commented
Hi, I've got this implementation ready. Please, let me know what to do for the next step.
anishkny commented
@tzemanovic this looks amazing! ๐ a few suggestions:
- Could you summarize "How it works" in the README itself (its okay if not the whole blog post, at least some key information)?
- Could you run Postman API tests against your stack to ensure they work, and maybe even add to Travis YML file?
Great work!!!
tzemanovic commented
Hi Anish, thank you!
- I've had a link to a blog post with overview of the project, but it wasn't very visible, so I've updated it.
- Thanks for fixing the tests in #255, I've ran them and all are passing except for the timestamp tests such as:
tests['Article\\'s \"createdAt\" property is an ISO 8601 timestamp'] = new Date(article.createdAt).toISOString() === article.createdAt;",
SQLite seems to be using 3 more decimals for microseconds, which get lost in the new Date(t).toISOString()
conversion, but this is a valid ISO 8601 date.
tzemanovic commented
With the updates from #255 and #260, this is passing the postman tests now:
Conduit
โ Auth
โณ Register
POST https://localhost:3443/api/users [200 OK, 733B, 79ms]
โ Response contains "user" property
โ User has "email" property
โ User has "username" property
โ User has "bio" property
โ User has "image" property
โ User has "token" property
โณ Login
POST https://localhost:3443/api/users/login [200 OK, 733B, 33ms]
โ Response contains "user" property
โ User has "email" property
โ User has "username" property
โ User has "bio" property
โ User has "image" property
โ User has "token" property
โณ Login and Remember Token
POST https://localhost:3443/api/users/login [200 OK, 733B, 31ms]
โ Response contains "user" property
โ User has "email" property
โ User has "username" property
โ User has "bio" property
โ User has "image" property
โ User has "token" property
โ Global variable "token" has been set
โณ Current User
GET https://localhost:3443/api/user [200 OK, 733B, 4ms]
โ Response contains "user" property
โ User has "email" property
โ User has "username" property
โ User has "bio" property
โ User has "image" property
โ User has "token" property
โณ Update User
PUT https://localhost:3443/api/user [200 OK, 732B, 6ms]
โ Response contains "user" property
โ User has "email" property
โ User has "username" property
โ User has "bio" property
โ User has "image" property
โ User has "token" property
โ Articles
โณ All Articles
GET https://localhost:3443/api/articles [200 OK, 436B, 4ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ articlesCount is 0 when feed is empty
โณ Articles by Author
GET https://localhost:3443/api/articles?author=johnjacob [200 OK, 436B, 4ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ articlesCount is 0 when feed is empty
โณ Articles Favorited by Username
GET https://localhost:3443/api/articles?favorited=jane [200 OK, 436B, 3ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ articlesCount is 0 when feed is empty
โณ Articles by Tag
GET https://localhost:3443/api/articles?tag=dragons [200 OK, 436B, 3ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ articlesCount is 0 when feed is empty
โ Articles, Favorite, Comments
โณ Create Article
POST https://localhost:3443/api/articles [200 OK, 834B, 11ms]
โ Response contains "article" property
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โณ Feed
GET https://localhost:3443/api/articles/feed [200 OK, 436B, 3ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ articlesCount is 0 when feed is empty
โณ All Articles
GET https://localhost:3443/api/articles [200 OK, 855B, 3ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โณ All Articles with auth
GET https://localhost:3443/api/articles [200 OK, 855B, 3ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โณ Articles by Author
GET https://localhost:3443/api/articles?author=tzemanovic [200 OK, 855B, 5ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โณ Articles by Author with auth
GET https://localhost:3443/api/articles?author=tzemanovic [200 OK, 855B, 3ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โณ Articles Favorited by Username
GET https://localhost:3443/api/articles?favorited=jane [200 OK, 436B, 2ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ articlesCount is 0 when feed is empty
โณ Articles Favorited by Username with auth
GET https://localhost:3443/api/articles?favorited=jane [200 OK, 436B, 3ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ articlesCount is 0 when feed is empty
โณ Single Article by slug
GET https://localhost:3443/api/articles/how-to-train-your-dragon-toll6b [200 OK, 834B, 3ms]
โ Response contains "article" property
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โณ Articles by Tag
GET https://localhost:3443/api/articles?tag=dragons [200 OK, 855B, 4ms]
โ Response code is 200 OK
โ Response contains "articles" property
โ Response contains "articlesCount" property
โ articlesCount is an integer
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โณ Update Article
PUT https://localhost:3443/api/articles/how-to-train-your-dragon-toll6b [200 OK, 833B, 4ms]
โ Response contains "article" property
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โณ Favorite Article
POST https://localhost:3443/api/articles/how-to-train-your-dragon-toll6b/favorite [200 OK, 832B, 4ms]
โ Response contains "article" property
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article's 'favorited' property is true
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โ Article's 'favoritesCount' property is greater than 0
โณ Unfavorite Article
DELETE https://localhost:3443/api/articles/how-to-train-your-dragon-toll6b/favorite [200 OK, 833B, 3ms]
โ Response contains "article" property
โ Article has "title" property
โ Article has "slug" property
โ Article has "body" property
โ Article has "createdAt" property
โ Article's "createdAt" property is an ISO 8601 timestamp
โ Article has "updatedAt" property
โ Article's "updatedAt" property is an ISO 8601 timestamp
โ Article has "description" property
โ Article has "tagList" property
โ Article's "tagList" property is an Array
โ Article has "author" property
โ Article has "favorited" property
โ Article has "favoritesCount" property
โ favoritesCount is an integer
โ Article's "favorited" property is true
โณ Create Comment for Article
POST https://localhost:3443/api/articles/how-to-train-your-dragon-toll6b/comments [200 OK, 665B, 4ms]
โ Response contains "comment" property
โ Comment has "id" property
โ Comment has "body" property
โ Comment has "createdAt" property
โ "createdAt" property is an ISO 8601 timestamp
โ Comment has "updatedAt" property
โ "updatedAt" property is an ISO 8601 timestamp
โ Comment has "author" property
โณ All Comments for Article
GET https://localhost:3443/api/articles/how-to-train-your-dragon-toll6b/comments [200 OK, 668B, 2ms]
โ Response code is 200 OK
โ Response contains "comments" property
โ Comment has "id" property
โ Comment has "body" property
โ Comment has "createdAt" property
โ "createdAt" property is an ISO 8601 timestamp
โ Comment has "updatedAt" property
โ "updatedAt" property is an ISO 8601 timestamp
โ Comment has "author" property
โณ Delete Comment for Article
DELETE https://localhost:3443/api/articles/how-to-train-your-dragon-toll6b/comments/1 [200 OK, 407B, 2ms]
โณ Delete Article
DELETE https://localhost:3443/api/articles/how-to-train-your-dragon-toll6b [200 OK, 407B, 3ms]
โ Profiles
โณ Register Celeb
POST https://localhost:3443/api/users [200 OK, 745B, 31ms]
โ Response contains "user" property
โ User has "email" property
โ User has "username" property
โ User has "bio" property
โ User has "image" property
โ User has "token" property
โณ Profile
GET https://localhost:3443/api/profiles/celeb_tzemanovic [200 OK, 541B, 3ms]
โ Response code is 200 OK
โ Response contains "profile" property
โ Profile has "username" property
โ Profile has "bio" property
โ Profile has "image" property
โ Profile has "following" property
โณ Follow Profile
POST https://localhost:3443/api/profiles/celeb_tzemanovic/follow [200 OK, 540B, 4ms]
โ Response code is 200 OK
โ Response contains "profile" property
โ Profile has "username" property
โ Profile has "bio" property
โ Profile has "image" property
โ Profile has "following" property
โ Profile's "following" property is true
โณ Unfollow Profile
DELETE https://localhost:3443/api/profiles/celeb_tzemanovic/follow [200 OK, 541B, 3ms]
โ Response code is 200 OK
โ Response contains "profile" property
โ Profile has "username" property
โ Profile has "bio" property
โ Profile has "image" property
โ Profile has "following" property
โ Profile's "following" property is false
โ Tags
โณ All Tags
GET https://localhost:3443/api/tags [200 OK, 434B, 2ms]
โ Response code is 200 OK
โ Response contains "tags" property
โ "tags" property returned as array
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ executed โ failed โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ iterations โ 1 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ requests โ 31 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ test-scripts โ 46 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ prerequest-scripts โ 17 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ assertions โ 280 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโค
โ total run duration: 1024ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ total data received: 7.43KB (approx) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ average response time: 8ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
anishkny commented
Fantastic!