[{"data":1,"prerenderedAt":264,"buildId":265},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate":3},{"id":4,"title":5,"body":6,"description":247,"extension":248,"frontmatter":249,"heading":15,"meta":255,"navigation":257,"order":252,"path":258,"seo":259,"sitemap":260,"source":261,"stem":262,"__hash__":263},"docs\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate.md","kubb validate - Check an API spec",{"type":7,"value":8,"toc":239},"minimark",[9,17,27,34,39,87,91,134,157,161,193,201,205],[10,11,12,16],"p",{},[13,14,15],"code",{},"kubb validate"," checks your spec with the adapter in your Kubb config and generates nothing. Run it in CI or before you commit a spec change.",[18,19],"terminal",{"command":20,":output":21},"kubb validate .\u002FpetStore.yaml",[22,23,24,25,26],"✓ Validation passed 84ms",""," 1 specification validated"," Input .\u002FpetStore.yaml"," Adapter oas",[10,28,29,30,33],{},"On failure, it prints the validation error. When ",[13,31,32],{},"@kubb\u002Fadapter-oas"," is needed but missing, it prints the install command.",[35,36,38],"h2",{"id":37},"arguments","Arguments",[40,41,42,58],"table",{},[43,44,45],"thead",{},[46,47,48,52,55],"tr",{},[49,50,51],"th",{},"Argument",[49,53,54],{},"Required",[49,56,57],{},"What it does",[59,60,61],"tbody",{},[46,62,63,69,72],{},[64,65,66],"td",{},[13,67,68],{},"\u003Cinput>",[64,70,71],{},"Yes",[64,73,74,75,78,79,86],{},"Path, URL, or git input of the spec, such as ",[13,76,77],{},"https:\u002F\u002Fpetstore3.swagger.io\u002Fapi\u002Fv3\u002Fopenapi.json",". See ",[80,81,83],"a",{"href":82},"\u002Fdocs\u002F5.x\u002Freference\u002Fconfiguration#input",[13,84,85],{},"input"," for the format.",[35,88,90],{"id":89},"options","Options",[40,92,93,108],{},[43,94,95],{},[46,96,97,100,103,106],{},[49,98,99],{},"Flag",[49,101,102],{},"Alias",[49,104,105],{},"Default",[49,107,57],{},[59,109,110],{},[46,111,112,117,122,124],{},[64,113,114],{},[13,115,116],{},"--config \u003Cpath>",[64,118,119],{},[13,120,121],{},"-c",[64,123],{},[64,125,126,127,133],{},"Path to the Kubb config. Without it, Kubb looks for one the way ",[80,128,130],{"href":129},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fgenerate",[13,131,132],{},"kubb generate"," does.",[135,136,141],"pre",{"language":137,"filename":138,"code":139,"class":140},"shell","Terminal","kubb validate .\u002Fschema.graphql --config .\u002Fkubb.config.ts","highlights",[13,142,144],{"class":143},"language-shell",[145,146,149,153],"span",{"class":147,"style":148},"line","display: inline",[145,150,152],{"style":151},"color:#6f42c1;--hls-dark:#b392f0","kubb ",[145,154,156],{"style":155},"color:#24292e;--hls-dark:#e1e4e8","validate .\u002Fschema.graphql --config .\u002Fkubb.config.ts",[35,158,160],{"id":159},"which-adapter-runs","Which adapter runs",[40,162,163,173],{},[43,164,165],{},[46,166,167,170],{},[49,168,169],{},"Situation",[49,171,172],{},"Adapter",[59,174,175,183],{},[46,176,177,180],{},[64,178,179],{},"A config is found or passed",[64,181,182],{},"The adapter of each config entry.",[46,184,185,188],{},[64,186,187],{},"No config",[64,189,190,192],{},[13,191,32],{},", for OpenAPI and Swagger documents.",[10,194,195,196,200],{},"See ",[80,197,199],{"href":198},"\u002Fdocs\u002F5.x\u002Freference\u002Fconfiguration#config-loading","Config loading",".",[35,202,204],{"id":203},"exit-codes","Exit codes",[40,206,207,217],{},[43,208,209],{},[46,210,211,214],{},[49,212,213],{},"Code",[49,215,216],{},"When",[59,218,219,229],{},[46,220,221,226],{},[64,222,223],{},[13,224,225],{},"0",[64,227,228],{},"The spec is valid.",[46,230,231,236],{},[64,232,233],{},[13,234,235],{},"1",[64,237,238],{},"The spec is invalid, a config entry has no adapter, or the adapter is not installed.",{"title":23,"searchDepth":240,"depth":240,"links":241},5,[242,244,245,246],{"id":37,"depth":243,"text":38},2,{"id":89,"depth":243,"text":90},{"id":159,"depth":243,"text":160},{"id":203,"depth":243,"text":204},"The validate command checks a specification with the adapter in your Kubb config, or the OpenAPI adapter without one, and runs no generation.","md",{"layout":250,"title":5,"description":247,"outline":251,"order":252,"navigation":253},"doc",[243,252],3,{"title":15,"icon":254},"i-iconoir-check-circle",{"layout":250,"outline":256},[243,252],{"title":15,"icon":254},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate",{"title":5,"description":247},{"loc":258},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate.md","docs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate","GoMdMHjG7P4K5lndphszupWJw7Gno1AZF4z70U0B9H4",1795727677418,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]