Skip to content

Commit 025693a

Browse files
committed
Add ADR section to the generated docs
* Moving the old asciidoc files into VitePress and ensuring that a new section is linked to from the main menu (top).
1 parent ed43310 commit 025693a

File tree

5 files changed

+60
-21
lines changed

5 files changed

+60
-21
lines changed

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,21 @@ install i:
1212
tidy pretty format f:
1313
./mvnw formatter:format
1414

15-
.PHONY: docs watch-docs
15+
##
16+
## Build the documentation and deploy it to the gh-pages branch. The
17+
## documentation is built using VitePress for the main site and Maven Javadoc
18+
## for the API documentation. Local development of the documentation can be done
19+
## using `make docs-dev`, which will start a local VitePress server.
20+
##
21+
.PHONY: docs docs-dev
1622
docs:
1723
npm run docs:build
1824
mvn javadoc:javadoc
1925
cp -R target/site/apidocs xdocs/.vitepress/dist/
2026
npm run deploy-docs
2127

22-
watch-docs:
23-
mvn asciidoctor:http
28+
docs-dev:
29+
npm run docs:dev
2430

2531
.PHONY: ui
2632
ui: ui/query-response-ui.jar

xdocs/.vitepress/config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default defineConfig({
1616
{ text: "Home", link: "/" },
1717
{ text: "Guide", link: "/guide/what-is-query-response" },
1818
{ text: "Reference", link: "/reference/developers-reference" },
19+
{ text: "ADR", link: "/adr/adrs"}
1920
],
2021
sidebar: [
2122
{
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
= Title
1+
# Title
22

3-
== Status
3+
## Status
44

55
What is the status, such as proposed, accepted, rejected, deprecated,
66
superseded, etc.?
77

8-
== Context
8+
## Context
99

1010
What is the issue that we're seeing that is motivating this decision or change?
1111

12-
== Decision
12+
## Decision
1313

1414
What is the change that we're proposing and/or doing?
1515

16-
== Consequences
16+
## Consequences
1717

1818
What becomes easier or more difficult to do because of this change?

docs/ADR-001-builder-beans.adoc renamed to xdocs/adr/ADR-001-builder-beans.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
= Builder Beans
1+
# Builder Beans
22

3-
== Status
3+
## Status
44

55
Accepted.
66

7-
== Context
7+
## Context
88

9-
There's an idiomatic way of providing library functionality throughout Spring.
10-
Modules such as Spring JDBC, AMQP or Web provide _templates_ as beans. Users
11-
can have these templates injected into their components, and access the
9+
There's an idiomatic way of providing library functionality throughout Spring.
10+
Modules such as Spring JDBC, AMQP or Web provide *templates* as beans. Users
11+
can have these templates injected into their components, and access the
1212
functionality.
1313

14-
Publishing the Query/Response API through static factory methods, may be
15-
convenient but **it is not the common way.** It also hides the capabilities
16-
of _mock_ or _test dummy_ setup in the user code, which makes testing harder.
14+
Publishing the Query/Response API through static factory methods may be
15+
convenient but **it is not the common way.** It also hides the capabilities
16+
of *mock* or *test dummy* setup in the user code, which makes testing harder.
1717

18-
== Decision
18+
## Decision
1919

20-
The `QueryBuilder` and `ResponseBuilder` should both be made available through
20+
The `QueryBuilder` and `ResponseBuilder` should both be made available through
2121
the means of bean injection. The static factory methods are removed.
2222

2323
The beans shall be available as mockable types, to better support testing.
2424

25-
== Consequences
25+
## Consequences
2626

27-
A lot of complexity caused by static access to the registry beans, will
27+
A lot of complexity caused by static access to the registry beans will
2828
disappear.
2929

3030
The convenient and very terse static API is no longer available.

xdocs/adr/adrs.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Architecture Decision Records (ADR)
2+
3+
Architecture Decision Records provide a way to document the decisions
4+
made in the architecture of a system. They help in understanding the context,
5+
decision-making process, and consequences of architectural choices.
6+
7+
## Accepted ADRs
8+
9+
The following ADRs have been accepted and are part of the project's architecture
10+
documentation:
11+
12+
- [ADR-001-builder-beans](./ADR-001-builder-beans)
13+
14+
## Template for new ADRs
15+
16+
The [ADR-000-TEMPLATE.md](ADR-000-TEMPLATE.md) provides a structured format for
17+
documenting decisions. It includes sections for the title, status, context,
18+
decision, and consequences.
19+
20+
## Add a new ADR
21+
22+
1. Create a new PR by branching off the `main` branch, naming it
23+
`adr/XXX-title`, where `XXX` is the next available number and `title` is a
24+
very short description of the decision.
25+
26+
2. Add a new ADR file in the `xdocs/adr` directory using the available template.
27+
Ensure that the file follows the naming convention `ADR-XXX-title.md`, using
28+
the same number as the branch name.
29+
30+
3. Update the `xdocs/adr/adrs.md` file to include a link to the new ADR file.
31+
32+
4. Submit the PR for review.

0 commit comments

Comments
 (0)