@kubernetes-models/flux-cd
Version:
1 lines • 2.32 kB
JavaScript
export const validate=validate0;let schema1_enum=["head","HEAD","Tag","TagAndHEAD"];import{validate as validate2}from"./ComGithubFluxcdSourceControllerApiV1GitVerificationMode.js";function validate1(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data&&null!==data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(validate2(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?validate2.errors:vErrors.concat(validate2.errors)).length),"head"!==data&&"HEAD"!==data&&"Tag"!==data&&"TagAndHEAD"!==data){let err1={instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:schema1_enum}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate1.errors=vErrors,0===errors}import{validate as validate6}from"./ComGithubFluxcdPkgApisMetaLocalObjectReference.js";function validate5(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;return validate6(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?validate6.errors:vErrors.concat(validate6.errors)).length),validate5.errors=vErrors,0===errors}function validate0(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.secretRef){let err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"secretRef"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.mode&&(validate1(data.mode,{instancePath:instancePath+"/mode",parentData:data,parentDataProperty:"mode",rootData})||(errors=(vErrors=null===vErrors?validate1.errors:vErrors.concat(validate1.errors)).length)),void 0!==data.secretRef&&(validate5(data.secretRef,{instancePath:instancePath+"/secretRef",parentData:data,parentDataProperty:"secretRef",rootData})||(errors=(vErrors=null===vErrors?validate5.errors:vErrors.concat(validate5.errors)).length))}else{let err1={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate0.errors=vErrors,0===errors}