From 0f4364b2f2967996ac29dd44f19a16df804149aa Mon Sep 17 00:00:00 2001 From: magoeke Date: Mon, 17 Apr 2023 10:53:46 +0200 Subject: [PATCH] Added Readme --- task04/README.md | 15 +++++++++++++++ .../vs/task04/api/v1/InvoiceAPITest.java | 1 + 2 files changed, 16 insertions(+) create mode 100644 task04/README.md diff --git a/task04/README.md b/task04/README.md new file mode 100644 index 0000000..93c9324 --- /dev/null +++ b/task04/README.md @@ -0,0 +1,15 @@ +# Getting started + +This task is about Spring HATEOAS and Spring REST Docs. + +TODO 01 - 03 deal with Spring HATEOAS. Add the missing links. The TODO comments explain which links you should add. + +For the second part of this task edit the `InvoiceAPITest` file. Additional to that have a look at the file `all_invoices.doc`. +Execute `maven install` and look at the file in `target/generated-docs/index.html` to see the result. (TODO 04 - 07) + + + + + + + diff --git a/task04/src/test/java/de/hststuttgart/vs/task04/api/v1/InvoiceAPITest.java b/task04/src/test/java/de/hststuttgart/vs/task04/api/v1/InvoiceAPITest.java index 99419b2..ce436d4 100644 --- a/task04/src/test/java/de/hststuttgart/vs/task04/api/v1/InvoiceAPITest.java +++ b/task04/src/test/java/de/hststuttgart/vs/task04/api/v1/InvoiceAPITest.java @@ -134,6 +134,7 @@ class InvoiceAPITest { ), responseFields( fieldWithPath("invoices").description("Array that contains all invoices"), + fieldWithPath("invoices[].invoiceId").description("Id of an invoice"), subsectionWithPath("_links").description("Link to resources") ) ));