From the course: Planning a Versioned RESTful API with GitHub Copilot
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Creating book schema - Github Copilot Tutorial
From the course: Planning a Versioned RESTful API with GitHub Copilot
Creating book schema
- [Instructor] The first thing before we start interacting with database is to create a schema of how our book would look for that. I've added a new directory called docs and added a markdown file called book_schema. Now, the reason for adding this file in the current project is so that I can attach it as a context and give it to GitHub Copilot. Otherwise, I will have to do a lot of copy paste before I send it to GitHub Copilot for code generation. Right now in this book schema, there are 17 fields that we would like to have. And if I have to hand code a schema for 17 fields and do all the proper validation, it may take some time. And I'm wondering if GitHub Copilot can help me create a schema that matches a MongoDB document. Right now, our project does not have any context of what database we are using. We do have Mongo database, but our GitHub Copilot doesn't know that much yet. So I'm going to add necessary dependencies to our pyproject.toml file. And in order to do that, I'm going…
Contents
-
-
-
-
-
(Locked)
Creating book schema5m 27s
-
(Locked)
Implementing repository pattern on book4m 38s
-
Testing book repository6m 42s
-
(Locked)
Implementing service pattern on repository3m 59s
-
(Locked)
Testing book service4m 38s
-
(Locked)
Implementing API endpoints for books5m 11s
-
(Locked)
Testing books API endpoints2m 56s
-
(Locked)
Testing automated documentation APIs2m 40s
-
(Locked)
-
-