You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{constcps: ConditionalParameterSchema={allOf: [{if: {requester_if_need_affiliate: 'true',},then: {requester_affiliates: {format: 'select',description: null,disabled: false,type: 'string',title: 'Please specify Affiliates',required: true,enum: ['Partner Solutions Inc','Cime','Royal Sun Alliance','Intact Public Entities','Coast','Intact Specialty Lines','On Side restoration','Other',],},allOf: [{if: {requester_affiliates: 'Other',},then: {requester_other_affiliate_company: {format: 'text',description: null,disabled: false,type: 'string',title: "Please provide the other affiliate's company name",required: true,},},},],},},],};
It should maintain the original structure with the allOf fields at the same level but unfortunately, it appears to be parsing the allOf first and then making everything a child of allOf and outputs this which is a different structure than the input:
{allOf: [{if: {requester_if_need_affiliate: 'true'},then: {allOf: [{if: {requester_affiliates: 'Other'},then: {requester_other_affiliate_company: {title: "Please provide the other affiliate's company name",description: null,required: true,type: 'string',format: 'text',disabled: false}}}]}}]}
Can anyone spot what is wrong with my recursive schema?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have created this stackblitz which has a failing test to show the problem.
I have this schema which has this schema
Given an object like this:
It should maintain the original structure with the
allOf
fields at the same level but unfortunately, it appears to be parsing theallOf
first and then making everything a child ofallOf
and outputs this which is a different structure than the input:Can anyone spot what is wrong with my recursive schema?
Beta Was this translation helpful? Give feedback.
All reactions