-
Notifications
You must be signed in to change notification settings - Fork 534
chore: handle free form object using any #1090
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
base: main
Are you sure you want to change the base?
Conversation
|
@@ -174,7 +174,7 @@ export class JobInstance { | |||
/** | |||
* The details of a job which is an object that contains an array of status grouped by `status` state. Each `status` object has a `status` string, a count which is the number of days in that `status`, and list of days in that `status`. The day strings are in the format yyyy-MM-dd. As an example, a currently running job may have a status object for COMPLETED and a `status` object for SUBMITTED each with its own count and list of days. | |||
*/ | |||
details: Record<string, object>; | |||
details: Record<string, any>; |
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.
This should be an array, Record<string, any>[]
. Please see my original comment from when the breaking change was introduced: #1076 (comment)
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 have mentioned there that this particular field is a list but in our specification it is written as an object. I'll convey this to my team to fix this. It is still under process
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 just checked with my team and I think what they want to send in this field is something of this sort:
{
[
{
status: 'Submitted',
count: 3,
days: [ '2025-03-07', '2025-03-08', '2025-03-09' ]
}
]
}
Thus it should be object and not list. Is this correct with your API call too?
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 API response that I received is an array of objects. The example where you show an array nested directly inside of an object is not valid JavaScript or JSON so that would not be possible to do.
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 you are right, let me get this fixed with my team. Thanks!
Fixes #1076
These are preview changes for handling free form objects correctly using
Record<string, any>
instead ofRecord<string, object>
.Note: Close this PR only when the OAI generator changes are merged.
Checklist
If you have questions, please file a support ticket, or create a GitHub Issue in this repository.