Skip to content

Commit 6464978

Browse files
committed
reference swagger
1 parent 7650109 commit 6464978

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,27 +202,33 @@ We have tried out write coding for a few simple tasks earlier. Now let's explore
202202
- Return a random country from the array
203203
- Return the country and its iso code
204204

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
206212

207213
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.
208214

209215
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.
210216

211-
### Exercise 7: Document the code
217+
### Exercise 8: Document the code
212218

213219
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.
214220

215221
You can use `@workspaces` to write documentation for the whole repo.
216222

217-
### Exercise 8: Verify Tests
223+
### Exercise 9: Verify Tests
218224

219225
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!
220226

221227
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.
222228

223229
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.
224230

225-
### Exercise 9: Create a Dockerfile
231+
### Exercise 10: Create a Dockerfile
226232

227233
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.
228234

0 commit comments

Comments
 (0)