Skip to content

Commit 9cbc8b7

Browse files
authored
Fix formatting (#253)
1 parent b4f8943 commit 9cbc8b7

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

data-rest-composite-id/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This example demonstrates how to implement and expose entities with composite ID
2121

2222
== Entity Classes
2323

24-
In this example, we have two entity classes: `Book`[${source-main}/book/Book.java] and `Author`[${source-main}/book/Author.java].
24+
In this example, we have two entity classes: link:{source-main}/book/Book.java[`Book`] and link:{source-main}/book/Author.java[`Author`].
2525
Both use composite IDs implemented as embedded classes.
2626

2727
=== Book Entity

docs/modules/ROOT/pages/data-rest-composite-id.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
:source-highlighter: highlight.js
33
Rashidi Zin <rashidi@zin.my>
44
1.0, July 13, 2025
5-
:toc:
65
:nofooter:
76
:icons: font
87
:url-quickref: https://github.com/rashidi/spring-boot-tutorials/tree/master/data-rest-composite-id
@@ -21,7 +20,7 @@ This example demonstrates how to implement and expose entities with composite ID
2120

2221
== Entity Classes
2322

24-
In this example, we have two entity classes: `Book`[${source-main}/book/Book.java] and `Author`[${source-main}/book/Author.java].
23+
In this example, we have two entity classes: link:{source-main}/book/Book.java[`Book`] and link:{source-main}/book/Author.java[`Author`].
2524
Both use composite IDs implemented as embedded classes.
2625

2726
=== Book Entity
@@ -233,13 +232,13 @@ void create() {
233232
.post().uri("/books")
234233
.content("""
235234
{
236-
"isbn": "9781509827829",
235+
"isbn": "9781402745777",
237236
"title": "The Jungle Book",
238237
"author": "http://localhost/authors/100"
239238
}
240239
""")
241240
.assertThat().headers()
242-
.extracting(LOCATION).asString().isEqualTo("http://localhost/books/9781509827829");
241+
.extracting(LOCATION).asString().isEqualTo("http://localhost/books/9781402745777");
243242
}
244243
----
245244

@@ -251,8 +250,8 @@ This test creates a Book with an ISBN, title, and author reference, then verifie
251250
----
252251
@Test
253252
@Sql(statements = {
254-
"INSERT INTO author (id, first_name, last_name) VALUES (100, 'Rudyard', 'Kipling')",
255-
"INSERT INTO book (prefix, registration_group, registrant, publication, check_digit, author_id, title) VALUES (978, 1, 509, 82782, 9, 100, 'The Jungle Book')"
253+
"INSERT INTO author (id, first_name, last_name) VALUES (200, 'Rudyard', 'Kipling')",
254+
"INSERT INTO book (prefix, registration_group, registrant, publication, check_digit, author_id, title) VALUES (978, 1, 509, 82782, 9, 200, 'The Jungle Book')"
256255
})
257256
@DisplayName("Given a book is available When I request by its ISBN Then its information should be returned")
258257
void get() {

0 commit comments

Comments
 (0)