[{"data":1,"prerenderedAt":731},["ShallowReactive",2],{"libs":3,"navigation-laravel-openapi-generator":115,"\u002Flaravel-openapi-generator\u002Fworkflow\u002Fcontinuous-integration":296,"\u002Flaravel-openapi-generator\u002Fworkflow\u002Fcontinuous-integration-surround":726},[4,45,69,95],{"id":5,"color":6,"compatibility":7,"extension":20,"icon":21,"links":22,"meta":27,"name":28,"order":29,"package":30,"related":31,"stem":34,"tagline":35,"__hash__":36,"slug":37,"repository":38,"branch":39,"path":40,"collection":41,"entry":42,"home":43,"version":44},"laravel_json_api_meta\u002Fdocs\u002Fsite\u002Flib.yml","violet",[8,13,16],{"version":9,"php":10,"laravel":11,"status":12},"3.x","^8.3","^12.46 || ^13.0","active",{"version":14,"php":10,"laravel":11,"status":15},"2.x","eol",{"version":17,"php":18,"laravel":19,"status":15},"1.x","^8.1","^10.0 || ^11.0 || ^12.0 || ^13.0","yml","i-lucide-braces",[23],{"label":24,"to":25,"icon":26},"JSON:API 1.1","https:\u002F\u002Fjsonapi.org\u002Fformat\u002F","i-lucide-book-marked",{},"Laravel JSON:API",10,"ark4ne\u002Flaravel-json-api",[32,33],"laravel-api-revisions","laravel-openapi-generator","docs\u002Fsite\u002Flib","JSON:API 1.1 resources for Laravel, with typed values, validated includes and fieldsets, and API revisions.","ILGoVp9rzKYDQc18VV8kkXy3EQOQ8rv87JblFKXYDrU","laravel-json-api","Ark4ne\u002Flaravel-json-api","master","docs\u002Fsite","laravel_json_api","\u002Flaravel-json-api\u002Fgetting-started\u002Fintroduction","\u002Flaravel-json-api","v3.0.0",{"id":46,"color":47,"compatibility":48,"extension":20,"icon":50,"links":51,"meta":56,"name":57,"order":58,"package":59,"related":60,"stem":34,"tagline":61,"__hash__":62,"slug":32,"repository":63,"branch":64,"path":40,"collection":65,"entry":66,"home":67,"version":68},"laravel_api_revisions_meta\u002Fdocs\u002Fsite\u002Flib.yml","amber",[49],{"version":17,"php":10,"laravel":11,"status":12},"i-lucide-git-branch",[52],{"label":53,"to":54,"icon":55},"Agent skill","https:\u002F\u002Fgithub.com\u002FArk4ne\u002Flaravel-api-revisions\u002Ftree\u002Fmain\u002Fskills\u002Flaravel-api-revisions","i-lucide-bot",{},"Laravel API Revisions",20,"ark4ne\u002Flaravel-api-revisions",[37,33],"Typed schemas for Laravel resources and form requests, evolved through dated API revisions, Stripe-style.","w24MBVK4_XliIZ8nVcfnuT9OgR-m-Ytxz31Pxua_mLM","Ark4ne\u002Flaravel-api-revisions","main","laravel_api_revisions","\u002Flaravel-api-revisions\u002Fgetting-started\u002Fintroduction","\u002Flaravel-api-revisions","v1.0.0",{"id":70,"color":71,"compatibility":72,"extension":20,"icon":77,"links":78,"meta":82,"name":83,"order":84,"package":85,"related":86,"stem":34,"tagline":88,"__hash__":89,"slug":33,"repository":90,"branch":39,"path":40,"collection":91,"entry":92,"home":93,"version":94},"laravel_openapi_generator_meta\u002Fdocs\u002Fsite\u002Flib.yml","emerald",[73,75],{"version":17,"php":10,"laravel":74,"status":12},"^13.0",{"version":76,"php":18,"laravel":19,"status":15},"0.6","i-lucide-file-json",[79],{"label":80,"to":81,"icon":26},"OpenAPI Specification","https:\u002F\u002Fspec.openapis.org\u002Foas\u002Flatest.html",{},"Laravel OpenAPI Generator",30,"ark4ne\u002Flaravel-openapi-generator",[87,37,32],"openapi-writer","Generates OpenAPI 3.0, 3.1 and 3.2 documents from a Laravel application, its routes, form requests and resources.","DTt0SVqegMImLmWmwL8LCW5lxRCWFYcnBFOaquLpVwc","Ark4ne\u002Flaravel-openapi-generator","laravel_openapi_generator","\u002Flaravel-openapi-generator\u002Fgetting-started\u002Fintroduction","\u002Flaravel-openapi-generator","v1.2.0",{"id":96,"color":97,"compatibility":98,"extension":20,"icon":101,"links":102,"meta":104,"name":105,"order":106,"package":107,"related":108,"stem":34,"tagline":109,"__hash__":110,"slug":87,"repository":111,"branch":64,"path":40,"collection":112,"entry":113,"home":114,"version":68},"openapi_writer_meta\u002Fdocs\u002Fsite\u002Flib.yml","sky",[99],{"version":17,"php":100,"status":12},"^8.2","i-lucide-file-pen-line",[103],{"label":80,"to":81,"icon":26},{},"OpenAPI Writer",40,"ark4ne\u002Fopenapi-writer",[33],"Framework-agnostic, fluent and immutable PHP builder for OpenAPI 3.0, 3.1 and 3.2 documents, written as JSON or YAML and validated.","JFQcdQ9GEChOkfRKibLjoxZOfnt6HYNsayX2melOzMk","Ark4ne\u002Fopenapi-writer","openapi_writer","\u002Fopenapi-writer\u002Fgetting-started\u002Fintroduction","\u002Fopenapi-writer",[116,135,169,191,213,243,258,284],{"title":117,"since":118,"experimental":119,"icon":120,"path":121,"stem":122,"children":123,"page":119},"Getting started",null,false,"i-lucide-rocket","\u002Flaravel-openapi-generator\u002Fgetting-started","laravel-openapi-generator\u002F1.getting-started",[124,127,131],{"title":125,"path":92,"stem":126,"since":118,"experimental":119},"Introduction","laravel-openapi-generator\u002F1.getting-started\u002F1.introduction",{"title":128,"path":129,"stem":130,"since":118,"experimental":119},"Installation","\u002Flaravel-openapi-generator\u002Fgetting-started\u002Finstallation","laravel-openapi-generator\u002F1.getting-started\u002F2.installation",{"title":132,"path":133,"stem":134,"since":118,"experimental":119},"Quick start","\u002Flaravel-openapi-generator\u002Fgetting-started\u002Fquick-start","laravel-openapi-generator\u002F1.getting-started\u002F3.quick-start",{"title":136,"since":118,"experimental":119,"icon":137,"path":138,"stem":139,"children":140,"page":119},"Documenting endpoints","i-lucide-route","\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints","laravel-openapi-generator\u002F2.documenting-endpoints",[141,145,149,153,157,161,165],{"title":142,"path":143,"stem":144,"since":118,"experimental":119},"How it works","\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Fhow-it-works","laravel-openapi-generator\u002F2.documenting-endpoints\u002F1.how-it-works",{"title":146,"path":147,"stem":148,"since":118,"experimental":119},"Routes & operations","\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Froutes-and-operations","laravel-openapi-generator\u002F2.documenting-endpoints\u002F2.routes-and-operations",{"title":150,"path":151,"stem":152,"since":118,"experimental":119},"Requests","\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Frequests","laravel-openapi-generator\u002F2.documenting-endpoints\u002F3.requests",{"title":154,"path":155,"stem":156,"since":118,"experimental":119},"Responses","\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Fresponses","laravel-openapi-generator\u002F2.documenting-endpoints\u002F4.responses",{"title":158,"path":159,"stem":160,"since":118,"experimental":119},"Sampling","\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Fsampling","laravel-openapi-generator\u002F2.documenting-endpoints\u002F5.sampling",{"title":162,"path":163,"stem":164,"since":118,"experimental":119},"Security & errors","\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Fsecurity-and-errors","laravel-openapi-generator\u002F2.documenting-endpoints\u002F6.security-and-errors",{"title":166,"path":167,"stem":168,"since":118,"experimental":119},"Webhooks & callbacks","\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Fwebhooks-and-callbacks","laravel-openapi-generator\u002F2.documenting-endpoints\u002F7.webhooks-and-callbacks",{"title":170,"since":118,"experimental":119,"icon":171,"path":172,"stem":173,"children":174,"page":119},"Documents","i-lucide-files","\u002Flaravel-openapi-generator\u002Fdocuments","laravel-openapi-generator\u002F3.documents",[175,179,183,187],{"title":176,"path":177,"stem":178,"since":118,"experimental":119},"Configuring a document","\u002Flaravel-openapi-generator\u002Fdocuments\u002Fconfiguring-a-document","laravel-openapi-generator\u002F3.documents\u002F1.configuring-a-document",{"title":180,"path":181,"stem":182,"since":118,"experimental":119},"Several documents","\u002Flaravel-openapi-generator\u002Fdocuments\u002Fseveral-documents","laravel-openapi-generator\u002F3.documents\u002F2.several-documents",{"title":184,"path":185,"stem":186,"since":118,"experimental":119},"Output","\u002Flaravel-openapi-generator\u002Fdocuments\u002Foutput","laravel-openapi-generator\u002F3.documents\u002F3.output",{"title":188,"path":189,"stem":190,"since":118,"experimental":119},"Translations","\u002Flaravel-openapi-generator\u002Fdocuments\u002Ftranslations","laravel-openapi-generator\u002F3.documents\u002F4.translations",{"title":192,"since":118,"experimental":119,"icon":193,"path":194,"stem":195,"children":196,"page":119},"Workflow","i-lucide-terminal","\u002Flaravel-openapi-generator\u002Fworkflow","laravel-openapi-generator\u002F4.workflow",[197,201,205,209],{"title":198,"path":199,"stem":200,"since":118,"experimental":119},"Diagnostics","\u002Flaravel-openapi-generator\u002Fworkflow\u002Fdiagnostics","laravel-openapi-generator\u002F4.workflow\u002F1.diagnostics",{"title":202,"path":203,"stem":204,"since":118,"experimental":119},"Continuous integration","\u002Flaravel-openapi-generator\u002Fworkflow\u002Fcontinuous-integration","laravel-openapi-generator\u002F4.workflow\u002F2.continuous-integration",{"title":206,"path":207,"stem":208,"since":118,"experimental":119},"Troubleshooting","\u002Flaravel-openapi-generator\u002Fworkflow\u002Ftroubleshooting","laravel-openapi-generator\u002F4.workflow\u002F3.troubleshooting",{"title":210,"path":211,"stem":212,"since":118,"experimental":119},"Agent skills","\u002Flaravel-openapi-generator\u002Fworkflow\u002Fagent-skills","laravel-openapi-generator\u002F4.workflow\u002F4.agent-skills",{"title":214,"since":118,"experimental":119,"icon":215,"path":216,"stem":217,"children":218,"page":119},"Extending","i-lucide-puzzle","\u002Flaravel-openapi-generator\u002Fextending","laravel-openapi-generator\u002F5.extending",[219,223,227,231,235,239],{"title":220,"path":221,"stem":222,"since":118,"experimental":119},"Overview","\u002Flaravel-openapi-generator\u002Fextending\u002Foverview","laravel-openapi-generator\u002F5.extending\u002F1.overview",{"title":224,"path":225,"stem":226,"since":118,"experimental":119},"Rule mappers","\u002Flaravel-openapi-generator\u002Fextending\u002Frule-mappers","laravel-openapi-generator\u002F5.extending\u002F2.rule-mappers",{"title":228,"path":229,"stem":230,"since":118,"experimental":119},"Request & response extractors","\u002Flaravel-openapi-generator\u002Fextending\u002Frequest-and-response-extractors","laravel-openapi-generator\u002F5.extending\u002F3.request-and-response-extractors",{"title":232,"path":233,"stem":234,"since":118,"experimental":119},"Operations & strategies","\u002Flaravel-openapi-generator\u002Fextending\u002Foperations-and-strategies","laravel-openapi-generator\u002F5.extending\u002F4.operations-and-strategies",{"title":236,"path":237,"stem":238,"since":118,"experimental":119},"Samplers","\u002Flaravel-openapi-generator\u002Fextending\u002Fsamplers","laravel-openapi-generator\u002F5.extending\u002F5.samplers",{"title":240,"path":241,"stem":242,"since":118,"experimental":119},"Passes & middlewares","\u002Flaravel-openapi-generator\u002Fextending\u002Fpasses-and-middlewares","laravel-openapi-generator\u002F5.extending\u002F6.passes-and-middlewares",{"title":244,"since":118,"experimental":119,"icon":245,"path":246,"stem":247,"children":248,"page":119},"Integrations","i-lucide-plug","\u002Flaravel-openapi-generator\u002Fintegrations","laravel-openapi-generator\u002F6.integrations",[249,253],{"title":250,"path":251,"stem":252,"since":118,"experimental":119},"JSON:API","\u002Flaravel-openapi-generator\u002Fintegrations\u002Fjson-api","laravel-openapi-generator\u002F6.integrations\u002F1.json-api",{"title":254,"path":255,"stem":256,"since":257,"experimental":119},"API revisions","\u002Flaravel-openapi-generator\u002Fintegrations\u002Fapi-revisions","laravel-openapi-generator\u002F6.integrations\u002F2.api-revisions","1.2",{"title":259,"since":118,"experimental":119,"icon":260,"path":261,"stem":262,"children":263,"page":119},"Reference","i-lucide-library","\u002Flaravel-openapi-generator\u002Freference","laravel-openapi-generator\u002F7.reference",[264,268,272,276,280],{"title":265,"path":266,"stem":267,"since":118,"experimental":119},"Configuration","\u002Flaravel-openapi-generator\u002Freference\u002Fconfiguration","laravel-openapi-generator\u002F7.reference\u002F1.configuration",{"title":269,"path":270,"stem":271,"since":118,"experimental":119},"Attributes","\u002Flaravel-openapi-generator\u002Freference\u002Fattributes","laravel-openapi-generator\u002F7.reference\u002F2.attributes",{"title":273,"path":274,"stem":275,"since":118,"experimental":119},"Commands","\u002Flaravel-openapi-generator\u002Freference\u002Fcommands","laravel-openapi-generator\u002F7.reference\u002F3.commands",{"title":277,"path":278,"stem":279,"since":118,"experimental":119},"Validation rules","\u002Flaravel-openapi-generator\u002Freference\u002Fvalidation-rules","laravel-openapi-generator\u002F7.reference\u002F4.validation-rules",{"title":281,"path":282,"stem":283,"since":118,"experimental":119},"PHPDoc types","\u002Flaravel-openapi-generator\u002Freference\u002Fphpdoc-types","laravel-openapi-generator\u002F7.reference\u002F5.phpdoc-types",{"title":285,"path":286,"children":287},"Releases","\u002Flaravel-openapi-generator\u002Freleases",[288,292],{"title":289,"path":290,"stem":291,"since":118,"experimental":119},"Upgrade guide","\u002Flaravel-openapi-generator\u002Fupgrade","laravel-openapi-generator\u002FUPGRADE",{"title":293,"path":294,"stem":295,"since":118,"experimental":119},"Changelog","\u002Flaravel-openapi-generator\u002Fchangelog","laravel-openapi-generator\u002FCHANGELOG",{"id":297,"title":202,"body":298,"description":719,"experimental":119,"extension":720,"links":118,"meta":721,"navigation":722,"path":203,"rawbody":723,"seo":724,"since":118,"stem":204,"__hash__":725},"laravel_openapi_generator\u002Flaravel-openapi-generator\u002F4.workflow\u002F2.continuous-integration.md",{"type":299,"value":300,"toc":712},"minimark",[301,305,310,344,360,416,420,423,546,553,557,589,600,604,607,670,674,684,708],[302,303,304],"p",{},"The documentation is generated from the code, so the code can break it: a resource that no longer runs on its sample,\nan action without return type, a feature the version cannot write. Check it on every change.",[306,307,309],"h2",{"id":308},"the-check","The check",[311,312,318],"pre",{"className":313,"code":314,"filename":315,"language":316,"meta":317,"style":317},"language-bash shiki shiki-themes material-theme-lighter github-light github-dark","php artisan openapi:generate --strict --dry-run\n","Terminal","bash","",[319,320,321],"code",{"__ignoreMap":317},[322,323,326,330,334,337,341],"span",{"class":324,"line":325},"line",1,[322,327,329],{"class":328},"sbgvK","php",[322,331,333],{"class":332},"s_sjI"," artisan",[322,335,336],{"class":332}," openapi:generate",[322,338,340],{"class":339},"stzsN"," --strict",[322,342,343],{"class":339}," --dry-run\n",[345,346,347,354],"ul",{},[348,349,350,353],"li",{},[319,351,352],{},"--dry-run"," generates and validates every document, and writes nothing.",[348,355,356,359],{},[319,357,358],{},"--strict"," fails on the first warning, not only on errors.",[361,362,363,376],"table",{},[364,365,366],"thead",{},[367,368,369,373],"tr",{},[370,371,372],"th",{},"Exit code",[370,374,375],{},"Meaning",[377,378,379,393,406],"tbody",{},[367,380,381,387],{},[382,383,384],"td",{},[319,385,386],{},"0",[382,388,389,390,392],{},"every document is valid (and written, without ",[319,391,352],{},")",[367,394,395,400],{},[382,396,397],{},[319,398,399],{},"1",[382,401,402,403,405],{},"a document has an error, or a warning with ",[319,404,358],{},": it is not written",[367,407,408,413],{},[382,409,410],{},[319,411,412],{},"2",[382,414,415],{},"the configuration or the options are invalid: nothing is generated",[306,417,419],{"id":418},"in-the-test-suite","In the test suite",[302,421,422],{},"The same check as a test, run with the rest of your suite:",[311,424,428],{"className":425,"code":426,"filename":427,"language":329,"meta":317,"style":317},"language-php shiki shiki-themes material-theme-lighter github-light github-dark","public function test_the_api_documentation_is_complete(): void\n{\n    $this->artisan('openapi:generate', [\n        '--strict' => true,\n        '--dry-run' => true,\n    ])->assertSuccessful();\n}\n","tests\u002FFeature\u002FApiDocumentationTest.php",[319,429,430,455,461,492,511,526,540],{"__ignoreMap":317},[322,431,432,436,439,443,447,451],{"class":324,"line":325},[322,433,435],{"class":434},"sbsja","public",[322,437,438],{"class":434}," function",[322,440,442],{"class":441},"sGLFI"," test_the_api_documentation_is_complete",[322,444,446],{"class":445},"sP7_E","()",[322,448,450],{"class":449},"smGrS",":",[322,452,454],{"class":453},"sw1J6"," void\n",[322,456,458],{"class":324,"line":457},2,[322,459,460],{"class":445},"{\n",[322,462,464,468,471,474,477,481,484,486,489],{"class":324,"line":463},3,[322,465,467],{"class":466},"s39Yj","    $this",[322,469,470],{"class":449},"->",[322,472,473],{"class":441},"artisan",[322,475,476],{"class":445},"(",[322,478,480],{"class":479},"sjJ54","'",[322,482,483],{"class":332},"openapi:generate",[322,485,480],{"class":479},[322,487,488],{"class":445},",",[322,490,491],{"class":445}," [\n",[322,493,495,498,500,502,505,508],{"class":324,"line":494},4,[322,496,497],{"class":479},"        '",[322,499,358],{"class":332},[322,501,480],{"class":479},[322,503,504],{"class":449}," =>",[322,506,507],{"class":466}," true",[322,509,510],{"class":445},",\n",[322,512,514,516,518,520,522,524],{"class":324,"line":513},5,[322,515,497],{"class":479},[322,517,352],{"class":332},[322,519,480],{"class":479},[322,521,504],{"class":449},[322,523,507],{"class":466},[322,525,510],{"class":445},[322,527,529,532,534,537],{"class":324,"line":528},6,[322,530,531],{"class":445},"    ])",[322,533,470],{"class":449},[322,535,536],{"class":441},"assertSuccessful",[322,538,539],{"class":445},"();\n",[322,541,543],{"class":324,"line":542},7,[322,544,545],{"class":445},"}\n",[302,547,548,549,552],{},"Install ",[319,550,551],{},"opis\u002Fjson-schema"," as a dev dependency so that every document is also validated against the official OpenAPI\nschemas.",[306,554,556],{"id":555},"in-a-github-actions-workflow","In a GitHub Actions workflow",[311,558,563],{"className":559,"code":560,"filename":561,"language":562,"meta":317,"style":317},"language-yaml shiki shiki-themes material-theme-lighter github-light github-dark","- name: OpenAPI documentation\n  run: php artisan openapi:generate --strict --dry-run\n",".github\u002Fworkflows\u002Fci.yml","yaml",[319,564,565,579],{"__ignoreMap":317},[322,566,567,570,574,576],{"class":324,"line":325},[322,568,569],{"class":445},"-",[322,571,573],{"class":572},"sQzsp"," name",[322,575,450],{"class":445},[322,577,578],{"class":332}," OpenAPI documentation\n",[322,580,581,584,586],{"class":324,"line":457},[322,582,583],{"class":572},"  run",[322,585,450],{"class":445},[322,587,588],{"class":332}," php artisan openapi:generate --strict --dry-run\n",[302,590,591,592,595,596,599],{},"Factories run inside a rolled back transaction, so the job needs the database your factories use (an SQLite database\nin memory is enough for most applications). Set ",[319,593,594],{},"sampling.transactions"," to ",[319,597,598],{},"false"," to run without database.",[306,601,603],{"id":602},"committing-the-documents","Committing the documents",[302,605,606],{},"Two workflows work:",[345,608,609,620],{},[348,610,611,615,616,619],{},[612,613,614],"strong",{},"Generate on deploy."," Do not commit the files; run ",[319,617,618],{},"php artisan openapi:generate"," in the deployment. The document\nalways matches the code that runs.",[348,621,622,625,626,629,630,633,634,662,665,666,669],{},[612,623,624],{},"Commit and check."," Write the documents on a disk whose files you commit (the default ",[319,627,628],{},"local"," disk writes under\n",[319,631,632],{},"storage\u002Fapp\u002Fprivate",", usually ignored by Git), review their diff in pull requests, and fail CI when they are not up\nto date:",[311,635,637],{"className":559,"code":636,"filename":561,"language":562,"meta":317,"style":317},"- run: php artisan openapi:generate --strict\n- run: git diff --exit-code docs\u002Fopenapi\n",[319,638,639,651],{"__ignoreMap":317},[322,640,641,643,646,648],{"class":324,"line":325},[322,642,569],{"class":445},[322,644,645],{"class":572}," run",[322,647,450],{"class":445},[322,649,650],{"class":332}," php artisan openapi:generate --strict\n",[322,652,653,655,657,659],{"class":324,"line":457},[322,654,569],{"class":445},[322,656,645],{"class":572},[322,658,450],{"class":445},[322,660,661],{"class":332}," git diff --exit-code docs\u002Fopenapi\n",[663,664],"br",{},"The generation is deterministic (",[319,667,668],{},"sampling.seed","): the same code gives the same file.",[306,671,673],{"id":672},"partial-checks","Partial checks",[302,675,676,679,680,683],{},[319,677,678],{},"--document="," checks one document; ",[319,681,682],{},"-q"," keeps the output to the errors:",[311,685,687],{"className":313,"code":686,"filename":315,"language":316,"meta":317,"style":317},"php artisan openapi:generate --document=v2 --strict --dry-run -q\n",[319,688,689],{"__ignoreMap":317},[322,690,691,693,695,697,700,702,705],{"class":324,"line":325},[322,692,329],{"class":328},[322,694,333],{"class":332},[322,696,336],{"class":332},[322,698,699],{"class":339}," --document=v2",[322,701,340],{"class":339},[322,703,704],{"class":339}," --dry-run",[322,706,707],{"class":339}," -q\n",[709,710,711],"style",{},"html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .stzsN, html code.shiki .stzsN{--shiki-light:#91B859;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sQzsp, html code.shiki .sQzsp{--shiki-light:#E53935;--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":317,"searchDepth":463,"depth":463,"links":713},[714,715,716,717,718],{"id":308,"depth":457,"text":309},{"id":418,"depth":457,"text":419},{"id":555,"depth":457,"text":556},{"id":602,"depth":457,"text":603},{"id":672,"depth":457,"text":673},"Fail the build when the documentation degrades, and decide whether to commit the generated documents.","md",{},true,"---\ntitle: Continuous integration\ndescription: Fail the build when the documentation degrades, and decide whether to commit the generated documents.\n---\n\nThe documentation is generated from the code, so the code can break it: a resource that no longer runs on its sample,\nan action without return type, a feature the version cannot write. Check it on every change.\n\n## The check\n\n```bash [Terminal]\nphp artisan openapi:generate --strict --dry-run\n```\n\n- `--dry-run` generates and validates every document, and writes nothing.\n- `--strict` fails on the first warning, not only on errors.\n\n| Exit code | Meaning |\n| --- | --- |\n| `0` | every document is valid (and written, without `--dry-run`) |\n| `1` | a document has an error, or a warning with `--strict`: it is not written |\n| `2` | the configuration or the options are invalid: nothing is generated |\n\n## In the test suite\n\nThe same check as a test, run with the rest of your suite:\n\n```php [tests\u002FFeature\u002FApiDocumentationTest.php]\npublic function test_the_api_documentation_is_complete(): void\n{\n    $this->artisan('openapi:generate', [\n        '--strict' => true,\n        '--dry-run' => true,\n    ])->assertSuccessful();\n}\n```\n\nInstall `opis\u002Fjson-schema` as a dev dependency so that every document is also validated against the official OpenAPI\nschemas.\n\n## In a GitHub Actions workflow\n\n```yaml [.github\u002Fworkflows\u002Fci.yml]\n- name: OpenAPI documentation\n  run: php artisan openapi:generate --strict --dry-run\n```\n\nFactories run inside a rolled back transaction, so the job needs the database your factories use (an SQLite database\nin memory is enough for most applications). Set `sampling.transactions` to `false` to run without database.\n\n## Committing the documents\n\nTwo workflows work:\n\n- **Generate on deploy.** Do not commit the files; run `php artisan openapi:generate` in the deployment. The document\n  always matches the code that runs.\n- **Commit and check.** Write the documents on a disk whose files you commit (the default `local` disk writes under\n  `storage\u002Fapp\u002Fprivate`, usually ignored by Git), review their diff in pull requests, and fail CI when they are not up\n  to date:\n\n  ```yaml [.github\u002Fworkflows\u002Fci.yml]\n  - run: php artisan openapi:generate --strict\n  - run: git diff --exit-code docs\u002Fopenapi\n  ```\n\n  The generation is deterministic (`sampling.seed`): the same code gives the same file.\n\n## Partial checks\n\n`--document=` checks one document; `-q` keeps the output to the errors:\n\n```bash [Terminal]\nphp artisan openapi:generate --document=v2 --strict --dry-run -q\n```\n",{"title":202,"description":719},"f9CfrLh9akMyXMnI6zppW6LCwCSYuEg_pSLhPnyZFVc",[727,729],{"title":198,"path":199,"stem":200,"description":728,"children":-1},"Read what the generator did not understand, route by route, and inspect the operation it built for one route.",{"title":206,"path":207,"stem":208,"description":730,"children":-1},"The usual reasons a route, a response, a body or a property is missing or wrong, and how to fix them.",1795438899841]