Skip to content

Commit 6292ca1

Browse files
committed
add layer overview page
1 parent 70a30e0 commit 6292ca1

File tree

4 files changed

+69
-0
lines changed

4 files changed

+69
-0
lines changed

src/App.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import Routing from "./pages/usage/Routing";
2020
import Sorting from "./pages/usage/Sorting";
2121
import SparseFieldsets from "./pages/usage/SparseFieldsets";
2222

23+
import LayerOverview from "./pages/extensibility/LayerOverview";
24+
2325
const { ul } = glamorous;
2426

2527
const List = ul({
@@ -83,6 +85,12 @@ const App = () => {
8385
<Link to="/sparse-fieldsets">Sparse Field Sets</Link>
8486
</li>
8587
</List>
88+
<h3>Getting Started</h3>
89+
<List>
90+
<li>
91+
<Link to="/layer-overview">Layer Overview</Link>
92+
</li>
93+
</List>
8694
</nav>
8795
</Sidebar>
8896
<div className="item main">
@@ -104,6 +112,7 @@ const App = () => {
104112
<Route exact path="/routing" component={Routing} />
105113
<Route exact path="/sorting" component={Sorting} />
106114
<Route exact path="/sparse-fieldsets" component={SparseFieldsets} />
115+
<Route exact path="/layer-overview" component={LayerOverview} />
107116
</div>
108117
</div>
109118
</Router>

src/components/HtmlContent.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from "react";
2+
import ReactMarkdown from "react-markdown";
3+
import Content from "./Content";
4+
import glamorous from 'glamorous';
5+
6+
const Div = glamorous.div({
7+
marginLeft: '20px'
8+
})
9+
10+
export default props => {
11+
return <Div>{props.children}</Div>;
12+
};

src/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ body {
33
padding: 0;
44
font-family: sans-serif;
55
}
6+
::-webkit-scrollbar {
7+
display: none;
8+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import React from "react";
2+
import SplitPage from "../SplitPage";
3+
import Example from "../../components/Example";
4+
import ContentHeader from "../../components/ContentHeader";
5+
import HtmlContent from "../../components/HtmlContent";
6+
7+
export default () => {
8+
return (
9+
<SplitPage>
10+
<ContentHeader>Layer Overview</ContentHeader>
11+
<HtmlContent>
12+
By default, data retrieval is distributed across 3 layers:
13+
14+
<p>
15+
<a href="https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/JsonApiDotNetCore/Controllers/JsonApiController.cs">JsonApiController</a> (required)
16+
<br />
17+
└── <a href="https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/JsonApiDotNetCore/Services/EntityResourceService.cs">EntityResourceService</a> : <a href="https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/JsonApiDotNetCore/Services/Contract/IResourceService.cs">IResourceService</a>
18+
<br />
19+
&nbsp;&nbsp;&nbsp;&nbsp;└── <a href="https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs">DefaultEntityRepository</a> : <a href="https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/JsonApiDotNetCore/Data/IEntityRepository.cs">IEntityRepository</a>
20+
</p>
21+
</HtmlContent>
22+
<Example
23+
md={`
24+
Currently valid
25+
`}
26+
lang={"http"}
27+
code={`
28+
GET /articles?fields[articles]=title,body HTTP/1.1
29+
Accept: application/vnd.api+json
30+
`}
31+
/>
32+
33+
<Example
34+
md={`
35+
Not yet supported
36+
`}
37+
lang={"http"}
38+
code={`
39+
GET /articles?include=author&fields[articles]=title,body&fields[people]=name HTTP/1.1
40+
Accept: application/vnd.api+json
41+
`}
42+
/>
43+
</SplitPage>
44+
);
45+
};

0 commit comments

Comments
 (0)