-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Build options is an arbitrary json object rather than a string #183
Conversation
Codecov ReportAll modified lines are covered by tests ✅
📢 Thoughts on this report? Let us know!. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to update the Options
property on TranslationBuildDto
.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93 and @johnml1135)
src/Serval.Translation/Contracts/TranslationBuildConfigDto.cs
line 8 at r1 (raw file):
public IList<PretranslateCorpusConfigDto>? Pretranslate { get; set; } public object? Options { get; set; }
The Swagger docs show an invalid example for this property. Specifically, it shows a string value, which will result in a 400 status code. We should specify a valid example using code documentation. For example:
/// <example>
/// {
/// "property": "value"
/// }
/// </example>
I had intentionally not done that, but I suppose there's no good reason not to. It would make the presentation cleaner and more consistent to the user when they request an existing builds information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we want it to be consistent.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93 and @johnml1135)
Previously, ddaspit (Damien Daspit) wrote…
OK, good call: I wasn't familiar with how to do that properly, but I wondered the same thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @ddaspit and @johnml1135)
src/Serval.Translation/Contracts/TranslationBuildConfigDto.cs
line 8 at r1 (raw file):
Previously, Enkidu93 (Eli C. Lowry) wrote…
OK, good call: I wasn't familiar with how to do that properly, but I wondered the same thing.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93 and @johnml1135)
src/Serval.Translation/Contracts/TranslationBuildDto.cs
line 22 at r2 (raw file):
public JobState State { get; set; } public DateTime? DateFinished { get; set; } public object? Options { get; set; }
You should add the example here as well.
Previously, ddaspit (Damien Daspit) wrote…
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johnml1135)
0fffaf6
to
8e082a6
Compare
Fixes #180. I've verified that arbitrary JSON can be passed without error and parsed properly. It can also continue to be passed as a string.
This change is