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

[DMS-279] New ODS/API 7.2 error message format for key unification #198

Merged
merged 10 commits into from
Jul 23, 2024

Conversation

JBrenesSimpat
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Jul 19, 2024

Test Results

391 tests  ±0   372 ✅ ±0   2m 12s ⏱️ ±0s
  5 suites ±0    19 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 7ba2f3a. ± Comparison against base commit 867ec20.

♻️ This comment has been updated with latest results.

responseJson.Should().BeEquivalentTo(expectedBodyJson, options => options
.WithoutStrictOrdering()
.IgnoringCyclicReferences()
.RespectingRuntimeTypes()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing I found that it always gave the evaluation of the expected result as a false positive, I found that adding .RespectingRuntimeTypes() solves the problem.

@JBrenesSimpat JBrenesSimpat marked this pull request as ready for review July 22, 2024 15:38
.Select(x => $"'{x}'")
.ToArray()
);
var targetSegment = targetPath.Segments[1].ToString().Replace(".", "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that this will always be the proper way to get the property name you're looking for. It looks like you're assuming a path like {$.schoolReference.schoolId} and extracting schoolId. Instead of hard coding the segment at index 1, it might be safer to take the segment at the last index. Also instead of .Replace I would suggest either TrimStart or [1..]

@simpat-adam simpat-adam merged commit f8e9b66 into main Jul 23, 2024
12 checks passed
@simpat-adam simpat-adam deleted the DMS-279 branch July 23, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants