-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Describe the bug
The schemaApi.updateApplicationUserProfile has stopped supporting 'items' for custom attributes sent in the body. This seems highly likely due to the OpenAPI no longer showing this field.
However, if we set 'type' to 'array', we get this error "Items not present for array property: <prop_name>", which implies that the array type still expects the items field to determine the types of items in the array. This is also supported with using okta node sdk v7.1.1 which does accept the 'items' field.
You can see the 2 versions of the UserSchemaAttribute classes here, and you can see how 'items' was lost between the 2 versions:
https://github.com/okta/okta-sdk-nodejs/blob/0f22f61cb03f3681dc322f7b6622b5357d9983cc/src/types/generated/models/UserSchemaAttribute.d.ts
https://github.com/okta/okta-sdk-nodejs/blob/master/src/types/generated/models/UserSchemaAttribute.d.ts#L33
There is no documentation here on the breaking changes between 7.x and 8.x surrounding this change: https://github.com/okta/okta-sdk-nodejs/tree/master?tab=readme-ov-file#from-7x-to-80
Reproduction Steps?
call schemaApi.updateApplicationUserProfile with a body like the following:
{
definitions: {
custom: {
id: '#custom',
type: 'object',
properties: {
mycustomprop: {
title: 'mycustomprop',
externalName: 'mycustomprop',
description: 'NA',
type: 'array',
items: { // note: this is no longer in the schema, but due to the type: 'array' above, you get an error of lack of Items on this schema, see description
type: 'string'
},
required: false,
permissions: [
{
principal: 'SELF',
action: 'READ_WRITE'
}
]
}
},
required: []
}
}
}
SDK Versions
System:
OS: Windows 11 10.0.26100
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
Memory: 12.45 GB / 31.73 GB
Binaries:
Node: 22.16.0 - C:\Program Files\nodejs\node.EXE
npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 145.0.7632.160
Edge: Chromium (140.0.3485.94)
Firefox: 144.0.2 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.26100.7309
Additional Information
No response