Skip to content

Commit e54d01b

Browse files
committed
chore(*): document and bump version
1 parent cf738fd commit e54d01b

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

docs/Options.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,39 @@ public IServiceProvider ConfigureServices(IServiceCollection services) {
4545
// ...
4646
}
4747
```
48+
49+
## Relative Links
50+
51+
All links are absolute by default. However, you can configure relative links:
52+
53+
```csharp
54+
public IServiceProvider ConfigureServices(IServiceCollection services) {
55+
services.AddJsonApi<AppDbContext>(
56+
opt => opt.RelativeLinks = true);
57+
// ...
58+
}
59+
```
60+
61+
62+
```http
63+
GET /api/v1/articles/4309 HTTP/1.1
64+
Accept: application/vnd.api+json
65+
```
66+
67+
```json
68+
{
69+
"type": "articles",
70+
"id": "4309",
71+
"attributes": {
72+
"name": "Voluptas iure est molestias."
73+
},
74+
"relationships": {
75+
"author": {
76+
"links": {
77+
"self": "/api/v1/articles/4309/relationships/author",
78+
"related": "/api/v1/articles/4309/author"
79+
}
80+
}
81+
}
82+
}
83+
```

src/JsonApiDotNetCore/JsonApiDotNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<VersionPrefix>2.1.3</VersionPrefix>
3+
<VersionPrefix>2.1.4</VersionPrefix>
44
<TargetFrameworks>netstandard1.6</TargetFrameworks>
55
<AssemblyName>JsonApiDotNetCore</AssemblyName>
66
<PackageId>JsonApiDotNetCore</PackageId>

0 commit comments

Comments
 (0)