Skip to content

Commit c78adf8

Browse files
committed
Made multiple little corrections. Removed the html file extensions in the examples.
1 parent bcdfbde commit c78adf8

File tree

6 files changed

+94
-84
lines changed

6 files changed

+94
-84
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ site/
33
__pycache__/
44
*.pyc
55
.DS_Store
6+
.idea/

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ start: ## Start mkdocs server
44
@if [[ -f ".venv/bin/activate" && -x ".venv/bin/python" ]]; then \
55
echo "Using virtualenv Python"; \
66
. .venv/bin/activate; \
7-
python -m mkdocs serve; \
7+
python -m mkdocs serve -a localhost:8884; \
88
else \
99
echo "Virtualenv not found. Using system Python"; \
10-
python -m mkdocs serve; \
10+
python -m mkdocs serve -a localhost:8884; \
1111
fi
1212

1313
build: ## Build mkdocs site

docs/examples.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The simplest possible view descriptor: a single template with no slots.
1010

1111
```json title="vdp-simple.json"
1212
{
13-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/forms/form.html"
13+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/forms/form"
1414
}
1515
```
1616

@@ -19,7 +19,7 @@ The server might deliver this via the `View-Template` HTTP header:
1919
```http
2020
HTTP/1.1 200 OK
2121
Content-Type: application/json
22-
View-Template: https://github.com/SiteNetSoft/quarkus-pha/templates/components/forms/form.html
22+
View-Template: https://github.com/SiteNetSoft/quarkus-pha/templates/components/forms/form
2323
2424
{"csrfToken": "abc123", "loginUrl": "/auth/login"}
2525
```
@@ -34,22 +34,22 @@ A layout template with nested slots, forming a template tree. The sidebar layout
3434

3535
```json title="vdp-composed.json"
3636
{
37-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/layouts/sidebar.html",
37+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/layouts/sidebar",
3838
"slots": {
3939
"sidebarNav": {
40-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/navigation/nav.html"
40+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/navigation/nav"
4141
},
4242
"mainContent": {
43-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/demos/dashboard.html",
43+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/demos/dashboard",
4444
"slots": {
4545
"statsCards": {
46-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/card.html"
46+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/card"
4747
},
4848
"activityTable": {
49-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/table.html"
49+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/table"
5050
},
5151
"revenueChart": {
52-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/charts/chart.html"
52+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/charts/chart"
5353
}
5454
}
5555
}
@@ -60,12 +60,12 @@ A layout template with nested slots, forming a template tree. The sidebar layout
6060
The resulting template tree:
6161

6262
```
63-
sidebar.html
64-
├── sidebarNav → nav.html
65-
└── mainContent → dashboard.html
66-
├── statsCards → card.html
67-
├── activityTable → table.html
68-
└── revenueChart → chart.html
63+
sidebar
64+
├── sidebarNav → nav
65+
└── mainContent → dashboard
66+
├── statsCards → card
67+
├── activityTable → table
68+
└── revenueChart → chart
6969
```
7070

7171
This descriptor would typically be served as a standalone resource referenced via `Link` header:
@@ -86,18 +86,18 @@ Multiple named views for the same API response. The client selects a view based
8686
{
8787
"views": {
8888
"default": {
89-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/demos/dashboard.html",
89+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/demos/dashboard",
9090
"slots": {
9191
"statsCards": {
92-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/card.html"
92+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/card"
9393
},
9494
"activityTable": {
95-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/table.html"
95+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/table"
9696
}
9797
}
9898
},
9999
"compact": {
100-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/card.html"
100+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/card"
101101
}
102102
}
103103
}
@@ -126,30 +126,30 @@ A single slot accepting multiple templates rendered in sequence. Each element is
126126

127127
```json title="vdp-slot-array.json"
128128
{
129-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/layouts/sidebar.html",
129+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/layouts/sidebar",
130130
"slots": {
131131
"mainContent": [
132132
{
133-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/card.html"
133+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/card"
134134
},
135135
{
136-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/charts/chart.html"
136+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/charts/chart"
137137
},
138138
{
139-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/table.html"
139+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/data-display/table"
140140
}
141141
],
142142
"sidebarNav": {
143-
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/navigation/nav.html"
143+
"template": "https://github.com/SiteNetSoft/quarkus-pha/templates/components/navigation/nav"
144144
}
145145
}
146146
}
147147
```
148148

149149
The `mainContent` slot receives an array of three view descriptors. The client MUST render them in order:
150150

151-
1. `card.html`
152-
2. `chart.html`
153-
3. `table.html`
151+
1. `card`
152+
2. `chart`
153+
3. `table`
154154

155155
Each array element can itself contain nested `slots` for further composition.

docs/index.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ VDP works with **any rendering framework** — HTML/Qute, SwiftUI, Jetpack Compo
3333

3434
### Template Binding
3535

36-
The server declares *which* templates render *which* data. Templates handle data binding using their own mechanisms (Qute expressions, JSONPath, etc.).
36+
The server declares *which* templates render *which* data. Templates handle data binding using their own mechanisms (Qute expressions, mustache, Apache FreeMarker, JSONPath, etc.).
3737

3838
</div>
3939

4040
<div class="vdp-feature" markdown>
4141

4242
### Recursive Slots
4343

44-
Templates compose via named slots. Each slot value is itself a view descriptor, enabling arbitrarily deep template trees.
44+
Templates compose via named slots. Each slot value is itself a view descriptor, enabling arbitrarily deep template trees — in other words, templates within templates.
4545

4646
</div>
4747

4848
<div class="vdp-feature" markdown>
4949

5050
### Dual Transport
5151

52-
Embed view descriptors inline (`_view` / `_views` in HAL+JSON) or reference them via HTTP `Link` headers (RFC 8288) for constrained formats like OData4.
52+
Embed view descriptors inline (`_view` / `_views` in HAL+JSON) or reference them via HTTP `Link` headers ([RFC 8288](https://www.rfc-editor.org/rfc/rfc8288)) for constrained formats like OData4.
5353

5454
</div>
5555

@@ -73,7 +73,7 @@ One API response, multiple views. Serve different template trees for desktop, mo
7373

7474
### Standards-Compatible
7575

76-
Built on REST, HAL, RFC 8288, and OData4. VDP extends existing standards without breaking them.
76+
Built on REST, HAL, [RFC 8288](https://www.rfc-editor.org/rfc/rfc8288), and OData4. VDP extends existing standards without breaking them.
7777

7878
</div>
7979

@@ -85,21 +85,21 @@ A VDP view descriptor tells the client to render a sidebar layout, filling its s
8585

8686
```json
8787
{
88-
"template": "https://example.com/templates/layouts/sidebar.html",
88+
"template": "https://example.com/templates/layouts/sidebar",
8989
"slots": {
9090
"mainContent": {
91-
"template": "https://example.com/templates/dashboard.html",
91+
"template": "https://example.com/templates/dashboard",
9292
"slots": {
9393
"statsCards": {
94-
"template": "https://example.com/templates/components/card.html"
94+
"template": "https://example.com/templates/components/card"
9595
},
9696
"activityTable": {
97-
"template": "https://example.com/templates/components/table.html"
97+
"template": "https://example.com/templates/components/table"
9898
}
9999
}
100100
},
101101
"sidebarNav": {
102-
"template": "https://example.com/templates/components/nav.html"
102+
"template": "https://example.com/templates/components/nav"
103103
}
104104
}
105105
}
@@ -113,3 +113,6 @@ VDP is in **early working draft** stage (v0.1, alpha). The specification is bein
113113
[GitHub Organization](https://github.com/ViewDescriptorProtocol){ .secondary }
114114
[JSON Schema](schema.md){ .secondary }
115115
</div>
116+
117+
*[VDP]: View Descriptor Protocol
118+
*[HAL]: Hypertext Application Language

0 commit comments

Comments
 (0)