-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix(API): allow nullable value for job's due_date #534
Conversation
@@ -142,6 +142,7 @@ dependencies { | |||
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7' | |||
implementation 'com.google.code.gson:gson:2.8.6' | |||
implementation 'io.gsonfire:gson-fire:1.8.4' | |||
implementation 'org.openapitools:jackson-databind-nullable:0.2.1' |
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.
The reason for adding this line was failure encountered in Java tests regarding package resolution.
|
||
// Access the values from the JSON payload | ||
assert.Equal(t, requestBody["name"], "createjobactionb1") | ||
assert.Equal(t, requestBody["due_date"], nil) |
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.
I presume this assertion fails when the change in /path/jobs
is reverted?
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.
Yes, let me add some screenshot to description to make it clear. :)
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.
@jablan when I remove nullable from create.yaml
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.
thanks, I wasn't really doubting :)
minor comment: I wouldn't title this |
Purpose:
When creating a job from CLI and not providing
due_date
was adding a dummy due_date, which in fact was Go Lang adding a zero value to an attributedue_date
of Time type if no value is provided.This PR updates the schema to allow
nullable
values againstdue_date
forcreate
,update
requests as well as when fetching the job.Relevant Ticket: https://phrase.atlassian.net/browse/TSI-2297