Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 2.1 specification #141

Merged
merged 37 commits into from
Nov 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b2b3bd0
Added MalformedContext error to OpenError, ChannelError and ResolveError
bingenito Nov 6, 2023
f5eddd2
Updated definition of the instrument context type to include optional…
bingenito Nov 7, 2023
d5c2b04
Added MalformedContext error to OpenError, ChannelError and ResolveError
bingenito Nov 6, 2023
f01ab52
Updated definition of the instrument context type to include optional…
bingenito Nov 7, 2023
74016c7
Update Chart otherConfig to array of Context
bingenito Jul 15, 2024
a00d372
Correct inconsistent casing of fdc3.timeRange
bingenito Jul 15, 2024
9e64b3e
Update Chart tests to pass aray of Context
bingenito Jul 15, 2024
8d7cdc7
Rename ChatInitSettings.InitMessage to Message
bingenito Jul 15, 2024
414a9a8
Fix tests to use valid email and rename Fdsid to FDS_ID
bingenito Jul 15, 2024
639b5a0
Update schema version on tests
bingenito Jul 15, 2024
8b6cf5a
Merge branch 'fdc3-2_1' of https://github.com/bingenito/fdc3-dotnet i…
bingenito Jul 15, 2024
606fc52
Add TransactionResult context type
bingenito Jul 16, 2024
8cea70d
Add TransactionResultStatus helper static string values
bingenito Jul 16, 2024
5c600df
Add Action context type
bingenito Jul 16, 2024
5c95a62
Update version to prepare for 2.1.0 beta 1
bingenito Jul 17, 2024
d59928a
Add ChatRoom context type
bingenito Jul 17, 2024
2f803ad
Ignore obsolete warnings in tests as members still tested
bingenito Jul 19, 2024
9985b46
Add ChatSearchCriteria context type
bingenito Jul 19, 2024
905a4b5
Fix warnings
bingenito Jul 19, 2024
1ec3fd9
Add mising context Type property tests
bingenito Jul 19, 2024
ba7180a
Add Message context type
bingenito Jul 19, 2024
483ed1f
Add ChatMessage context type
bingenito Jul 19, 2024
616aa94
Update ChatInitSettings to use defined types
bingenito Jul 19, 2024
01dded7
Mark AppD displayName as obsolete
bingenito Jul 19, 2024
da43598
Mark AppD App Name as obsolete
bingenito Jul 19, 2024
084d350
Mark AppD App CustomConfig as obsolete
bingenito Jul 19, 2024
5e1c370
Fix AppD Interop AppChannel to use ID instead of Name
bingenito Jul 19, 2024
c196708
Changer Chart OtherConfig from array to IEnumerable
bingenito Jul 19, 2024
b6331db
Fix build warnings
bingenito Jul 29, 2024
914ecee
Add back ctor including obsolete members
bingenito Jul 29, 2024
ce68a38
Remove uncessary imports
bingenito Jul 29, 2024
f13c648
Add context type map entries for new context types
bingenito Jul 29, 2024
b4460d0
Update Message context Text to not be required
bingenito Oct 25, 2024
d849ff1
Update all mock fdsid test values to fds_id for consistency
bingenito Oct 25, 2024
bc3cfa6
Merge branch 'main' into fdc3-2_1
bingenito Oct 25, 2024
b2049a3
Disable warnings as errors for vulnerabilities less than critical
bingenito Oct 25, 2024
b798e1c
Merge branch 'fdc3-2_1' of https://github.com/bingenito/fdc3-dotnet i…
bingenito Oct 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update all mock fdsid test values to fds_id for consistency
bingenito committed Oct 25, 2024

Verified

This commit was signed with the committer’s verified signature.
jloboescalona2 Jorge Miguel Lobo Escalona
commit d849ff1f2bd5a11037108d8133dfbbe1d74dd40a
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ public ChatInitSettingsTests()
public async Task ChatInitSettings_SerializedJsonMatchesSchema()
{
ChatInitSettings chatInitSettings = new ChatInitSettings(
new ContactList(new Contact[] { new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fdsid" }) }),
new ContactList(new Contact[] { new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fds_id" }) }),
new Message(new MessageText() { TextPlain = "textplain", TextMarkdown = "textmarkdown" }),
"chatName",
new ChatInitSettingsOptions() { GroupRecipients = true, IsPublic = true, AllowHistoryBrowsing = true, AllowMessageCopy = true, AllowAddUser = true },
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ public ContactListTests()
[Fact]
public async Task ContactList_SerializedJsonMatchesSchema()
{
ContactList contactList = new ContactList(new Contact[] { new Contact(new ContactID { Email = "email@email.com", FDS_ID = "fdsid" }, "contact") }, "contactList");
ContactList contactList = new ContactList(new Contact[] { new Contact(new ContactID { Email = "email@email.com", FDS_ID = "fds_id" }, "contact") }, "contactList");
await this.ValidateSchema(contactList);
}
}
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ public ContactTests()
[Fact]
public async Task Contact_SerializedJsonMatchesSchema()
{
Contact contact = new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fdsid" }, "contact");
Contact contact = new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fds_id" }, "contact");
await this.ValidateSchema(contact);
}
}
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ public EmailTests()
[Fact]
public async Task Email_Contact_SerializedJsonMatchesSchema()
{
Email email = new Email(new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fdsid" }), "subject", "body", null, "email");
Email email = new Email(new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fds_id" }), "subject", "body", null, "email");
string test = await this.ValidateSchema(email);
}

@@ -38,7 +38,7 @@ public void Email_Contact_DeserializedJsonMatchesProperties()
Assert.NotNull(email);
Contact? contact = email?.Recipients as Contact;
Assert.Equal("email@test.com", contact?.ID?.Email);
Assert.Equal("fdsid", contact?.ID?.FDS_ID);
Assert.Equal("fds_id", contact?.ID?.FDS_ID);
Assert.Equal("subject", email?.Subject);
Assert.Equal("body", email?.TextBody);
Assert.Equal("email", email?.Name);
@@ -47,7 +47,7 @@ public void Email_Contact_DeserializedJsonMatchesProperties()
[Fact]
public async Task Email_ContactList_SerializedJsonMatchesSchema()
{
Email email = new Email(new ContactList(new Contact[] { new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fdsid" }) }), "subject", "body", null, "email");
Email email = new Email(new ContactList(new Contact[] { new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fds_id" }) }), "subject", "body", null, "email");
await this.ValidateSchema(email);
}

@@ -59,7 +59,7 @@ public void Email_ContactList_DeserializedJsonMatchesProperties()
ContactList? contactList = email?.Recipients as ContactList;
Contact? contact = contactList?.Contacts?.First<Contact>();
Assert.Equal("email@test.com", contact?.ID?.Email);
Assert.Equal("fdsid", contact?.ID?.FDS_ID);
Assert.Equal("fds_id", contact?.ID?.FDS_ID);
Assert.Equal("subject", email?.Subject);
Assert.Equal("body", email?.TextBody);
Assert.Equal("email", email?.Name);
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"recipients": {
"id": {
"email": "email@test.com",
"FDS_ID": "fdsid"
"FDS_ID": "fds_id"
},
"type": "fdc3.contact"
},
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
{
"id": {
"email": "email@test.com",
"FDS_ID": "fdsid"
"FDS_ID": "fds_id"
},
"type": "fdc3.contact"
}
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ public OrganizationTests()
[Fact]
public async Task Organization_SerializedJsonMatchesSchema()
{
Organization organization = new Organization(new OrganizationID() { FDS_ID = "fdc_id", LEI = "lei", PERMID = "permid" }, "organization");
Organization organization = new Organization(new OrganizationID() { FDS_ID = "fds_id", LEI = "lei", PERMID = "permid" }, "organization");

await this.ValidateSchema(organization);
}
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ public TransactionResultTests()
[Fact]
public async Task TransactionResult_SerializedJsonMatchesSchema()
{
TransactionResult transactionResult = new TransactionResult("Created", new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fdsid" }, "contact"), "message");
TransactionResult transactionResult = new TransactionResult("Created", new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fds_id" }, "contact"), "message");
await this.ValidateSchema(transactionResult);
}
}
4 changes: 2 additions & 2 deletions src/Tests/Finos.Fdc3.SystemTextJson.Tests/EmailTests.cs
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ public void Email_Contact_DeserializedJsonMatchesProperties()
Assert.NotNull(email);
Contact? contact = email?.Recipients as Contact;
Assert.Equal("email@test.com", contact?.ID?.Email);
Assert.Equal("fdsid", contact?.ID?.FDS_ID);
Assert.Equal("fds_id", contact?.ID?.FDS_ID);
Assert.Equal("subject", email?.Subject);
Assert.Equal("body", email?.TextBody);
Assert.Equal("email", email?.Name);
@@ -42,7 +42,7 @@ public void Email_ContactList_DeserializedJsonMatchesProperties()
ContactList? contactList = email?.Recipients as ContactList;
Contact? contact = contactList?.Contacts?.First<Contact>();
Assert.Equal("email@test.com", contact?.ID?.Email);
Assert.Equal("fdsid", contact?.ID?.FDS_ID);
Assert.Equal("fds_id", contact?.ID?.FDS_ID);
Assert.Equal("subject", email?.Subject);
Assert.Equal("body", email?.TextBody);
Assert.Equal("email", email?.Name);
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ public void ChatInitSettings_PropertiesMatchParams()
ChatInitSettingsOptions options = new ChatInitSettingsOptions() { GroupRecipients = true, IsPublic = true, AllowHistoryBrowsing = true, AllowMessageCopy = true, AllowAddUser = true };
Message message = new Message(new MessageText() { TextPlain = "textplain", TextMarkdown = "textmarkdown" });
ChatInitSettings chatInitSettings = new ChatInitSettings(
new ContactList(new Contact[] { new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fdsid" }) }),
new ContactList(new Contact[] { new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fds_id" }) }),
message,
"chatName",
options,
2 changes: 1 addition & 1 deletion src/Tests/Finos.Fdc3.Tests/Context/ContactListTests.cs
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ public class ContactListTests
[Fact]
public void ContactList_PropertiesMatchParams()
{
ContactList contactList = new ContactList(new Contact[] { new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fdsid" }, "contact") }, "contactList");
ContactList contactList = new ContactList(new Contact[] { new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fds_id" }, "contact") }, "contactList");

Assert.Same("email@test.com", contactList?.Contacts?.First<Contact>()?.ID?.Email);
Assert.Same("contactList", contactList?.Name);
2 changes: 1 addition & 1 deletion src/Tests/Finos.Fdc3.Tests/Context/ContactTests.cs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ public class ContactTests
[Fact]
public void Contact_PropertiesMatchParams()
{
Contact contact = new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fdsid" }, "contact");
Contact contact = new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fds_id" }, "contact");

Assert.Same("email@test.com", contact?.ID?.Email);
Assert.Same("contact", contact?.Name);
4 changes: 2 additions & 2 deletions src/Tests/Finos.Fdc3.Tests/Context/EmailTests.cs
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ public class EmailTests
[Fact]
public void Email_Contact_PropertiesMatchParams()
{
Email email = new Email(new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fdsid" }), "subject", "body", null, "email");
Email email = new Email(new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fds_id" }), "subject", "body", null, "email");

Assert.Same("email@test.com", (email?.Recipients as Contact)?.ID?.Email);
Assert.Same("email", email?.Name);
@@ -31,7 +31,7 @@ public void Email_Contact_PropertiesMatchParams()
[Fact]
public void Email_ContactList_PropertiesMatchParams()
{
Email email = new Email(new ContactList(new Contact[] { new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fdsid" }) }), "subject", "body", null, "email");
Email email = new Email(new ContactList(new Contact[] { new Contact(new ContactID() { Email = "email@test.com", FDS_ID = "fds_id" }) }), "subject", "body", null, "email");

Assert.Same("email@test.com", (email?.Recipients as ContactList)?.Contacts?.First<Contact>()?.ID?.Email);
Assert.Same("email", email?.Name);
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ public class TransactionResultTests
[Fact]
public void TransactionResult_PropertiesMatchParams()
{
Contact contact = new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fdsid" }, "contact");
Contact contact = new Contact(new ContactID { Email = "email@test.com", FDS_ID = "fds_id" }, "contact");
TransactionResult result = new TransactionResult("Created", contact, "message");

Assert.Same("Created", result.Status);