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
Copy file name to clipboardExpand all lines: README.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,27 +202,33 @@ We have tried out write coding for a few simple tasks earlier. Now let's explore
202
202
- Return a random country from the array
203
203
- Return the country and its iso code
204
204
205
-
### Exercise 6: Refactor the code to follow REST principles
205
+
### Exercise 6: Adding in Swagger
206
+
207
+
Lets now add in Swagger to the project. This will involve installing the following dependency `springfox-boot-starter`. The version should be `3.0.0`.
208
+
209
+
Ask Copilot how you could achieve this. You can use the `@workspaces` command to give Copilot the context of the structure of the whole repo.
210
+
211
+
### Exercise 7: Refactor the code to follow REST principles
206
212
207
213
At this point in the previous exercises, we created a number of endpoints that are not following REST principles. Let's refactor the code to follow REST principles. You should also update the Swagger documentation, so that each endpoint has a summary and is grouped using tags.
208
214
209
215
Ask Copilot how you could achieve this. You can use the `@workspaces` command to give Copilot the context of the structure of the whole repo.
210
216
211
-
### Exercise 7: Document the code
217
+
### Exercise 8: Document the code
212
218
213
219
Documenting code is always a boring and painful task. However, we can use Copilot to document it for us. In the chat, ask Copilot to add javadoc to all of your files.
214
220
215
221
You can use `@workspaces` to write documentation for the whole repo.
216
222
217
-
### Exercise 8: Verify Tests
223
+
### Exercise 9: Verify Tests
218
224
219
225
Have you been building your Unit Tests along the way? If not this is the perfect time to take a breather and get Copilot to write some unit tests for you!
220
226
221
227
We will create automated tests to check that the functionality of the previous endpoints is correctly implemented. The tests should be together in the `CopilotDemoApplicationTests.java` file.
222
228
223
229
You can leverage Copilot to run the tests. There is a `/tests` command that you can directly run from Copilot Chat or by selecting the piece of code you want to create tests for and using the Copilot inline feature.
224
230
225
-
### Exercise 9: Create a Dockerfile
231
+
### Exercise 10: Create a Dockerfile
226
232
227
233
Use the Dockerfile provided to create a docker image of the application. There are some comments in the Dockerfile that will help you to complete the exercise.
0 commit comments