[{"data":1,"prerenderedAt":174},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate":3},{"id":4,"title":5,"body":6,"description":157,"extension":158,"frontmatter":159,"heading":5,"meta":165,"navigation":167,"order":162,"path":168,"seo":169,"sitemap":170,"source":171,"stem":172,"__hash__":173},"docs\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate.md","kubb validate",{"type":7,"value":8,"toc":152},"minimark",[9,21,31,54,57,75,98,103,145],[10,11,12,13,16,17,20],"p",{},"Run ",[14,15,5],"code",{}," to check a specification with the adapter in your Kubb config, without running generation. Use it to catch errors early in CI or before you commit a spec change. Without a config, it uses ",[14,18,19],{},"@kubb\u002Fadapter-oas"," for OpenAPI and Swagger documents.",[22,23],"terminal",{"command":24,":output":25},"kubb validate .\u002FpetStore.yaml",[26,27,28,29,30],"✓ Validation passed  84ms","","  1 specification validated","  Input    .\u002FpetStore.yaml","  Adapter  oas",[10,32,33,34,37,38,41,42,45,46,53],{},"The input can also be a URL, such as ",[14,35,36],{},"https:\u002F\u002Fpetstore3.swagger.io\u002Fapi\u002Fv3\u002Fopenapi.json",", or a file in a git repository, such as ",[14,39,40],{},"git+https:\u002F\u002Fgithub.com\u002Forg\u002Fapi.git#main:specs\u002Fopenapi.yaml",". Kubb fetches a git input into a temporary folder with ",[14,43,44],{},"git",", validates it, and deletes the folder. See ",[47,48,50],"a",{"href":49},"\u002Fdocs\u002F5.x\u002Freference\u002Fconfiguration#input",[14,51,52],{},"input"," for the format.",[10,55,56],{},"The summary shows the result and elapsed time before the input and the adapter's name. Validation runs no generator plugins and writes no generated files. A failure includes the validation error. When the default OpenAPI adapter is missing, the error includes its installation command.",[10,58,59,60,63,64,67,68,71,72,74],{},"The command discovers the project's config or accepts ",[14,61,62],{},"--config \u003Cpath>"," (",[14,65,66],{},"-c","). Each config's adapter validates the supplied input, with local paths resolved from that config's ",[14,69,70],{},"root",", or the current directory when ",[14,73,70],{}," is omitted. A URL or git input is passed unchanged. A config without an adapter fails instead of substituting the OpenAPI adapter.",[76,77,82],"pre",{"language":78,"filename":79,"code":80,"class":81},"shell","Terminal","kubb validate .\u002Fschema.graphql --config .\u002Fkubb.config.ts","highlights",[14,83,85],{"class":84},"language-shell",[86,87,90,94],"span",{"class":88,"style":89},"line","display: inline",[86,91,93],{"style":92},"color:#6f42c1;--hls-dark:#b392f0","kubb ",[86,95,97],{"style":96},"color:#24292e;--hls-dark:#e1e4e8","validate .\u002Fschema.graphql --config .\u002Fkubb.config.ts",[99,100,102],"h2",{"id":101},"arguments","Arguments",[104,105,106,122],"table",{},[107,108,109],"thead",{},[110,111,112,116,119],"tr",{},[113,114,115],"th",{},"Argument",[113,117,118],{},"Required",[113,120,121],{},"Description",[123,124,125],"tbody",{},[110,126,127,133,138],{},[128,129,130],"td",{},[14,131,132],{},"\u003Cinput>",[128,134,135],{},[14,136,137],{},"true",[128,139,140,141,144],{},"Path, URL, or git input (",[14,142,143],{},"git+\u003Crepo>#\u003Cref>:\u003Cpath>",") of the specification to validate.",[146,147,27,149,151],"blockquote",{"as":148},"tip",[14,150,5],{}," exits with a non-zero status code when the spec is invalid. Use it as a pre-commit hook or CI step to fail the build.",{"title":27,"searchDepth":153,"depth":153,"links":154},5,[155],{"id":101,"depth":156,"text":102},2,"The validate command checks a specification with the configured adapter without running the generation pipeline.","md",{"layout":160,"title":5,"description":157,"outline":161,"order":162,"navigation":163},"doc",[156,162],3,{"title":5,"icon":164},"i-iconoir-check-circle",{"layout":160,"outline":166},[156,162],{"title":5,"icon":164},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate",{"title":5,"description":157},{"loc":168},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate.md","docs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate","5DRMVYR97PGXvUame7nOSa8_VUmi6-8Vjy84d8BOSZY",1792879192571]