You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the artifacts of the completed 'lb4 example todo-list' don't completely match
the artifacts created by hand when user follows the Todo Tutorial and then the TodoList tutorial.
Differences
There is a TodoListImageController in finished tutorial that is not part of the tutorial instructions
The Todo and TodoList models don't seem to have navigational properties. See TodoRelations and TodoListRelations ; they are empty.
there is a difference in whether the id field is required and generated in the Todo and TodoList models.
there is an additional question Is the id omitted when creating a new instance? that is asked by the CLI when creating the TodoRepository. It is not clear what the answer should be.
Create TodoList’s Todo controller section is no longer necessary since todo-list-todo.controller.ts is already generated (there may be 1 or 2 controllers auto-generated, just double-check).
the data/db.json of the Todo Tutorial and TodoList Tutorial are different; the todo items in the former do not have the todoListID property. When following the instructions by hand, is it necessary to have instructions to tell the user to change the content in this file before proceeding with the TodoList tutorial? If so, we need to tell them.
Expected and Unexpected Behaviour
So with the completed 'lb4 example todo-list', all todo items in the data/db.json have a todoListID that they belong to, and those todoLists exist. (no problem)
In the api explorer :
I can post a todo with an id of a todolist that doesn't exist (e.g. 0) {unexpected}.
calling GET /todolist/0 returns 404 {expected},
calling GET /todolist/0/todos returns data {that's unexpected if todoList id=0 doesn't exist}
calling GET /todos/6/todo-list (todo id=6 belongs to todoList id=0 which doesn't exist) returns 404 {expected}
I can POST a todo (e.g. id=99) without a todoListID (unlike the others which all have this field) and when i perform GET /todos/99/todo-list it, will return the 1st todoList in the todoList table {unexpected}
The artifacts created as a result of following the todo and todolist tutorials match the artifacts that the user can download using lb4 example todo-list
The todo and todoList tutorials contain updated instructions, prompts from cli, and code excerpts
The TodoList tutorial instructions make it clear if data/db.json JSON data needs to be replaced with a new default JSON data in order to begin the ToDoList tutorial.
Interacting with all the endpoints list in the API explorer returns expected results
It is possible to specify inclusion resolvers via the API Explorer or via a browser http url
Regarding the inclusion resolvers mention in the point above
This should return the todoList #1 AND its todo items.
{"id":1,"title":"grocery","color":"green","todos":[{"id":5,"title":"carrots","desc":"White Carrots for soup","isComplete":false,"todoListId":1},{"id":6,"title":"bananas","desc":"Yellow bananas for banana bread","isComplete":false,"todoListId":1}]}
Right now, the artifacts of the completed 'lb4 example todo-list' don't completely match
the artifacts created by hand when user follows the Todo Tutorial and then the TodoList tutorial.
Differences
id
field is required and generated in the Todo and TodoList models.Is the id omitted when creating a new instance?
that is asked by the CLI when creating theTodoRepository
. It is not clear what the answer should be.Create TodoList’s Todo controller
section is no longer necessary sincetodo-list-todo.controller.ts
is already generated (there may be 1 or 2 controllers auto-generated, just double-check).Expected and Unexpected Behaviour
So with the completed 'lb4 example todo-list', all todo items in the data/db.json have a todoListID that they belong to, and those todoLists exist. (no problem)
In the api explorer :
Related Issues
#4147
Acceptance Criteria
lb4 example todo-list
data/db.json
JSON data needs to be replaced with a new default JSON data in order to begin the ToDoList tutorial.Regarding the inclusion resolvers mention in the point above
http://localhost:3000/todo-lists/1?filter[include][][relation]=todos
This should return the todoList #1 AND its todo items.
{"id":1,"title":"grocery","color":"green","todos":[{"id":5,"title":"carrots","desc":"White Carrots for soup","isComplete":false,"todoListId":1},{"id":6,"title":"bananas","desc":"Yellow bananas for banana bread","isComplete":false,"todoListId":1}]}
http://localhost:3000/todos/5?filter[include][][relation]=todoList
This should return a todo item by itself IF it is not part of a list
This should return a todo item AND the todoList it is part of .
{"id":5,"title":"carrots","desc":"White Carrots for soup","isComplete":false,"todoListId":1,"todoList":{"id":1,"title":"grocery","color":"green"}}
See Reporting Issues for more tips on writing good issues
The text was updated successfully, but these errors were encountered: