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
2 changed files with 3 additions and 3 deletions

View File

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

View File

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