fix(public-api): Create correct OAuth2 credential schema (#4111)

This commit is contained in:
Ricardo Espinoza 2022-09-16 10:12:59 -04:00 committed by GitHub
parent 0ab89ad5d6
commit 28ab4f66f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -152,7 +152,7 @@ export interface IRequired {
}
export interface IDependency {
if?: { properties: {} };
then?: { oneOf: IRequired[] };
then?: { allOf: IRequired[] };
else?: { allOf: IRequired[] };
}

View file

@ -220,7 +220,7 @@ export function toJsonSchema(properties: INodeProperties[]): IDataObject {
},
},
then: {
oneOf: [],
allOf: [],
},
else: {
allOf: [],
@ -228,7 +228,7 @@ export function toJsonSchema(properties: INodeProperties[]): IDataObject {
};
}
propertyRequiredDependencies[dependantName].then?.oneOf.push({ required: [property.name] });
propertyRequiredDependencies[dependantName].then?.allOf.push({ required: [property.name] });
propertyRequiredDependencies[dependantName].else?.allOf.push({
not: { required: [property.name] },
});