Skip to content

Commit d1d472e

Browse files
committed
docs:replace readable names with uuid
1 parent a023043 commit d1d472e

28 files changed

+337
-337
lines changed

config/clients/dotnet/CHANGELOG.md.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Updated to include support for [OpenFGA 0.3.0](https://github.com/openfga/openfg
131131

132132
Changes:
133133
- [BREAKING] feat(list-objects)!: response has been changed to include the object type
134-
e.g. response that was `{"object_ids":["roadmap"]}`, will now be `{"objects":["document:roadmap"]}`
134+
e.g. response that was `{"object_ids":["roadmap"]}`, will now be `{"objects":["document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"]}`
135135

136136
Fixes:
137137
- fix(models): update interfaces that had incorrectly optional fields to make them required

config/clients/dotnet/template/OpenFgaClientTests.mustache

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ public class {{appShortName}}ClientTests {
604604
new(new TupleKey {
605605
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
606606
Relation = "viewer",
607-
Object = "document:roadmap"
607+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"
608608
},
609609
TupleOperation.WRITE, DateTime.Now),
610610
},
@@ -662,7 +662,7 @@ public class {{appShortName}}ClientTests {
662662
new(new TupleKey {
663663
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
664664
Relation = "viewer",
665-
Object = "document:roadmap"
665+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"
666666
},
667667
DateTime.Now)
668668
}
@@ -686,7 +686,7 @@ public class {{appShortName}}ClientTests {
686686
var body = new ClientReadRequest() {
687687
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
688688
Relation = "viewer",
689-
Object = "document:roadmap",
689+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
690690
};
691691
var options = new ClientReadOptions { };
692692
var response = await fgaClient.Read(body, options);
@@ -717,7 +717,7 @@ public class {{appShortName}}ClientTests {
717717
new(new TupleKey {
718718
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
719719
Relation = "viewer",
720-
Object = "document:roadmap"
720+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"
721721
},
722722
DateTime.Now)
723723
}
@@ -783,7 +783,7 @@ public class {{appShortName}}ClientTests {
783783
new() {
784784
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
785785
Relation = "viewer",
786-
Object = "document:roadmap",
786+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
787787
}
788788
},
789789
Deletes = new List<ClientTupleKeyWithoutCondition>(), // should not get passed
@@ -828,7 +828,7 @@ public class {{appShortName}}ClientTests {
828828
new() {
829829
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
830830
Relation = "viewer",
831-
Object = "document:roadmap",
831+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
832832
}
833833
},
834834
};
@@ -872,14 +872,14 @@ public class {{appShortName}}ClientTests {
872872
new() {
873873
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
874874
Relation = "viewer",
875-
Object = "document:roadmap",
875+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
876876
},
877877
},
878878
Deletes = new List<ClientTupleKeyWithoutCondition> {
879879
new() {
880880
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
881881
Relation = "writer",
882-
Object = "document:roadmap",
882+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
883883
}
884884
},
885885
};
@@ -932,7 +932,7 @@ public class {{appShortName}}ClientTests {
932932
new() {
933933
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
934934
Relation = "viewer",
935-
Object = "document:roadmap",
935+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
936936
},
937937
new() {
938938
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
@@ -944,7 +944,7 @@ public class {{appShortName}}ClientTests {
944944
new() {
945945
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
946946
Relation = "writer",
947-
Object = "document:roadmap",
947+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
948948
}
949949
},
950950
};
@@ -997,12 +997,12 @@ public class {{appShortName}}ClientTests {
997997
var body = new ClientCheckRequest {
998998
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
999999
Relation = "viewer",
1000-
Object = "document:roadmap",
1000+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
10011001
ContextualTuples = new List<ClientTupleKey>() {
10021002
new() {
10031003
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
10041004
Relation = "editor",
1005-
Object = "document:roadmap",
1005+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
10061006
Condition = new RelationshipCondition() {
10071007
Name = "ViewCountLessThan200",
10081008
Context = new { Name = "Roadmap", Type = "document" }
@@ -1053,12 +1053,12 @@ public class {{appShortName}}ClientTests {
10531053
var body = new ClientCheckRequest {
10541054
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
10551055
Relation = "viewer",
1056-
Object = "document:roadmap",
1056+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
10571057
ContextualTuples = new List<ClientTupleKey>() {
10581058
new() {
10591059
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
10601060
Relation = "editor",
1061-
Object = "document:roadmap",
1061+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
10621062
Condition = new RelationshipCondition() {
10631063
Name = "ViewCountLessThan200",
10641064
Context = new { Name = "Roadmap", Type = "document" }
@@ -1135,36 +1135,36 @@ public class {{appShortName}}ClientTests {
11351135
new() {
11361136
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
11371137
Relation = "viewer",
1138-
Object = "document:roadmap",
1138+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
11391139
ContextualTuples = new List<ClientTupleKey>() {
11401140
new() {
11411141
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
11421142
Relation = "editor",
1143-
Object = "document:roadmap",
1143+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
11441144
}
11451145
},
11461146
},
11471147
new() {
11481148
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
11491149
Relation = "admin",
1150-
Object = "document:roadmap",
1150+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
11511151
ContextualTuples = new List<ClientTupleKey>() {
11521152
new() {
11531153
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
11541154
Relation = "editor",
1155-
Object = "document:roadmap",
1155+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
11561156
}
11571157
},
11581158
},
11591159
new() {
11601160
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
11611161
Relation = "creator",
1162-
Object = "document:roadmap",
1162+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
11631163
},
11641164
new() {
11651165
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
11661166
Relation = "deleter",
1167-
Object = "document:roadmap",
1167+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
11681168
}
11691169
};
11701170
var options = new ClientBatchCheckOptions {
@@ -1200,7 +1200,7 @@ public class {{appShortName}}ClientTests {
12001200
var mockHandler = new Mock<HttpMessageHandler>(MockBehavior.Strict);
12011201
12021202
var jsonResponse =
1203-
"{\"tree\":{\"root\":{\"name\":\"document:roadmap#owner\", \"union\":{\"nodes\":[{\"name\":\"document:roadmap#owner\", \"leaf\":{\"users\":{\"users\":[\"team:product#member\"]}}}, {\"name\":\"document:roadmap#owner\", \"leaf\":{\"tupleToUserset\":{\"tupleset\":\"document:roadmap#owner\", \"computed\":[{\"userset\":\"org:contoso#admin\"}]}}}]}}}}";
1203+
"{\"tree\":{\"root\":{\"name\":\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a#owner\", \"union\":{\"nodes\":[{\"name\":\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a#owner\", \"leaf\":{\"users\":{\"users\":[\"team:product#member\"]}}}, {\"name\":\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a#owner\", \"leaf\":{\"tupleToUserset\":{\"tupleset\":\"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a#owner\", \"computed\":[{\"userset\":\"org:contoso#admin\"}]}}}]}}}}";
12041204
mockHandler.Protected()
12051205
.Setup<Task<HttpResponseMessage>>(
12061206
"SendAsync",
@@ -1220,7 +1220,7 @@ public class {{appShortName}}ClientTests {
12201220

12211221
var body = new ClientExpandRequest {
12221222
Relation = "viewer",
1223-
Object = "document:roadmap",
1223+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
12241224
};
12251225
var response = await fgaClient.Expand(body, new ClientExpandOptions() {
12261226
AuthorizationModelId = "01GXSA8YR785C4FYS3C0RTG7B1",
@@ -1250,29 +1250,29 @@ public class {{appShortName}}ClientTests {
12501250
var mockHandler = new Mock<HttpMessageHandler>(MockBehavior.Strict);
12511251
var mockResponse = new ExpandResponse(
12521252
tree: new UsersetTree(
1253-
root: new Node(name: "document:roadmap1#owner",
1253+
root: new Node(name: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a1#owner",
12541254
union: new Nodes(
12551255
nodes: new List<Node>() {
1256-
new Node(name: "document:roadmap2#owner",
1256+
new Node(name: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a2#owner",
12571257
leaf: new Leaf(users: new Users(users: new List<string>() {"team:product#member"}))),
1258-
new Node(name: "document:roadmap3#owner",
1258+
new Node(name: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a3#owner",
12591259
leaf: new Leaf(tupleToUserset: new UsersetTreeTupleToUserset(
1260-
tupleset: "document:roadmap#owner",
1260+
tupleset: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a#owner",
12611261
computed: new List<Computed>() {new Computed(userset: "org:contoso#admin")}))),
12621262
}),
12631263
difference: new UsersetTreeDifference(
1264-
_base: new Node(name: "document:roadmap3#owner",
1264+
_base: new Node(name: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a3#owner",
12651265
leaf: new Leaf(users: new Users(users: new List<string>() {"team:product#member"}))),
1266-
subtract: new Node(name: "document:roadmap4#owner",
1266+
subtract: new Node(name: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a4#owner",
12671267
leaf: new Leaf(users: new Users(users: new List<string>() {"team:product#member"})))
12681268
),
12691269
intersection: new Nodes(
12701270
nodes: new List<Node>() {
1271-
new Node(name: "document:roadmap5#owner",
1271+
new Node(name: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a5#owner",
12721272
leaf: new Leaf(users: new Users(users: new List<string>() {"team:product#commentor"}))),
1273-
new Node(name: "document:roadmap6#owner",
1273+
new Node(name: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a6#owner",
12741274
leaf: new Leaf(tupleToUserset: new UsersetTreeTupleToUserset(
1275-
tupleset: "document:roadmap#viewer",
1275+
tupleset: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a#viewer",
12761276
computed: new List<Computed>() {new Computed(userset: "org:contoso#owner")}))),
12771277
}))
12781278
));
@@ -1294,7 +1294,7 @@ public class {{appShortName}}ClientTests {
12941294

12951295
var body = new ClientExpandRequest {
12961296
Relation = "viewer",
1297-
Object = "document:roadmap",
1297+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
12981298
};
12991299
var response = await fgaClient.Expand(body, new ClientExpandOptions {
13001300
AuthorizationModelId = "01GXSA8YR785C4FYS3C0RTG7B1",
@@ -1319,7 +1319,7 @@ public class {{appShortName}}ClientTests {
13191319
[Fact]
13201320
public async Task ListObjectsTest() {
13211321
var mockHandler = new Mock<HttpMessageHandler>(MockBehavior.Strict);
1322-
var expectedResponse = new ListObjectsResponse {Objects = new List<string> {"document:roadmap"}};
1322+
var expectedResponse = new ListObjectsResponse {Objects = new List<string> {"document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"}};
13231323
mockHandler.Protected()
13241324
.Setup<Task<HttpResponseMessage>>(
13251325
"SendAsync",
@@ -1349,7 +1349,7 @@ public class {{appShortName}}ClientTests {
13491349
new() {
13501350
User = "folder:product",
13511351
Relation = "parent",
1352-
Object = "document:roadmap",
1352+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
13531353
},
13541354
},
13551355
};
@@ -1411,13 +1411,13 @@ public class {{appShortName}}ClientTests {
14111411
var body =
14121412
new ClientListRelationsRequest() {
14131413
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
1414-
Object = "document:roadmap",
1414+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
14151415
Relations = new List<string> {"can_view", "can_edit", "can_delete", "can_rename"},
14161416
ContextualTuples = new List<ClientTupleKey>() {
14171417
new() {
14181418
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
14191419
Relation = "editor",
1420-
Object = "document:roadmap",
1420+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
14211421
}
14221422
}
14231423
};
@@ -1465,7 +1465,7 @@ public class {{appShortName}}ClientTests {
14651465
var body =
14661466
new ClientListRelationsRequest() {
14671467
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
1468-
Object = "document:roadmap",
1468+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
14691469
Relations = new List<string> {},
14701470
};
14711471

@@ -1553,7 +1553,7 @@ public class {{appShortName}}ClientTests {
15531553
new() {
15541554
User = "folder:product",
15551555
Relation = "parent",
1556-
Object = "document:roadmap",
1556+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
15571557
},
15581558
},
15591559
Context = new { ViewCount = 100 }
@@ -1650,7 +1650,7 @@ public class {{appShortName}}ClientTests {
16501650
var body = new List<ClientAssertion>() {new ClientAssertion() {
16511651
User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
16521652
Relation = "viewer",
1653-
Object = "document:roadmap",
1653+
Object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
16541654
Expectation = true,
16551655
}};
16561656

0 commit comments

Comments
 (0)