Skip to content

Commit 427cb9d

Browse files
.
1 parent 661ef1d commit 427cb9d

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Example for POST /api/content/v3/types
2+
{
3+
"label": "Weather Forecast",
4+
"languages": [
5+
"en"
6+
],
7+
"links": {},
8+
"contentTypes": {
9+
"Weather": {
10+
"contentType": [],
11+
"properties": {
12+
"Location": {
13+
"type": "Location"
14+
},
15+
"Description": {
16+
"type": "String"
17+
},
18+
"Temperature": {
19+
"type": "Int"
20+
}
21+
}
22+
}
23+
},
24+
"propertyTypes": {
25+
"Location": {
26+
"properties": {
27+
"Latitude": {
28+
"type": "Float"
29+
},
30+
"Longitude": {
31+
"type": "Float"
32+
}
33+
}
34+
}
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Example for PUT /api/content/v3/types
2+
{
3+
"label": "Weather Forecast",
4+
"languages": [
5+
"en"
6+
],
7+
"links": {},
8+
"contentTypes": {
9+
"Weather": {
10+
"contentType": [],
11+
"properties": {
12+
"Location": {
13+
"type": "Location"
14+
},
15+
"Description": {
16+
"type": "String"
17+
},
18+
"Temperature": {
19+
"type": "Int"
20+
}
21+
}
22+
}
23+
},
24+
"propertyTypes": {
25+
"Location": {
26+
"properties": {
27+
"Latitude": {
28+
"type": "Float"
29+
},
30+
"Longitude": {
31+
"type": "Float"
32+
}
33+
}
34+
}
35+
}
36+
}

Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Repository/DefaultGraphSourceRepository.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public async Task SaveAsync<T>(Func<T, string> generateId, T data)
3030
var fields = typeConfiguration.GetFields();
3131

3232
// TODO: Generate content json
33+
34+
// POST /api/content/v2/data
3335
}
3436

3537
public Task DeleteAsync(string id)
@@ -42,8 +44,10 @@ public async Task SaveTypeAsync<T>()
4244
// Check for configuration
4345
var typeConfiguration = new SourceConfigurationModel<T>();
4446
var fields = typeConfiguration.GetFields();
45-
47+
4648
// TODO: Generate types json
49+
50+
// PUT /api/content/v3/types
4751
}
4852
}
4953
}

0 commit comments

Comments
 (0)