[{"data":1,"prerenderedAt":617},["ShallowReactive",2],{"libs":3,"navigation-laravel-openapi-generator":115,"\u002Flaravel-openapi-generator\u002Fgetting-started\u002Fintroduction":296,"\u002Flaravel-openapi-generator\u002Fgetting-started\u002Fintroduction-surround":614},[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":125,"body":298,"description":607,"experimental":119,"extension":608,"links":118,"meta":609,"navigation":610,"path":92,"rawbody":611,"seo":612,"since":118,"stem":126,"__hash__":613},"laravel_openapi_generator\u002Flaravel-openapi-generator\u002F1.getting-started\u002F1.introduction.md",{"type":299,"value":300,"toc":603},"minimark",[301,309,499,573,578,580,586,590,599],[302,303,304,305,308],"p",{},"Laravel OpenAPI Generator writes the OpenAPI documents of your Laravel application from what the application already\ndeclares: its routes and their middlewares, the signatures and the PHPDoc of the actions, the form requests and their\nvalidation rules, and the API resources, which it runs on sampled models. PHP attributes complete what the code cannot\ntell. Each document is written in the OpenAPI version you choose (3.0, 3.1 or 3.2) with\n",[306,307,105],"a",{"href":114},".",[310,311,317],"pre",{"className":312,"code":313,"filename":314,"language":315,"meta":316,"style":316},"language-php shiki shiki-themes material-theme-lighter github-light github-dark","final class BookController\n{\n    \u002F**\n     * Add a book.\n     *\n     * @throws \\App\\Exceptions\\DuplicateIsbnException\n     *\u002F\n    public function store(StoreBookRequest $request): BookResource\n    {\n        return new BookResource(Book::query()->create($request->validated()));\n    }\n}\n","app\u002FHttp\u002FControllers\u002FBookController.php","php","",[318,319,320,336,343,350,356,362,392,398,435,441,487,493],"code",{"__ignoreMap":316},[321,322,325,329,332],"span",{"class":323,"line":324},"line",1,[321,326,328],{"class":327},"sbsja","final",[321,330,331],{"class":327}," class",[321,333,335],{"class":334},"sbgvK"," BookController\n",[321,337,339],{"class":323,"line":338},2,[321,340,342],{"class":341},"sP7_E","{\n",[321,344,346],{"class":323,"line":345},3,[321,347,349],{"class":348},"sutJx","    \u002F**\n",[321,351,353],{"class":323,"line":352},4,[321,354,355],{"class":348},"     * Add a book.\n",[321,357,359],{"class":323,"line":358},5,[321,360,361],{"class":348},"     *\n",[321,363,365,368,372,376,380,383,386,388],{"class":323,"line":364},6,[321,366,367],{"class":348},"     * ",[321,369,371],{"class":370},"sp_-d","@throws",[321,373,375],{"class":374},"slwOJ"," \\",[321,377,379],{"class":378},"sfi6f","App",[321,381,382],{"class":374},"\\",[321,384,385],{"class":378},"Exceptions",[321,387,382],{"class":374},[321,389,391],{"class":390},"sCdfi","DuplicateIsbnException\n",[321,393,395],{"class":323,"line":394},7,[321,396,397],{"class":348},"     *\u002F\n",[321,399,401,404,407,411,414,418,421,425,428,432],{"class":323,"line":400},8,[321,402,403],{"class":327},"    public",[321,405,406],{"class":327}," function",[321,408,410],{"class":409},"sGLFI"," store",[321,412,413],{"class":341},"(",[321,415,417],{"class":416},"sZMiF","StoreBookRequest",[321,419,420],{"class":341}," $",[321,422,424],{"class":423},"su5hD","request",[321,426,427],{"class":341},")",[321,429,431],{"class":430},"smGrS",":",[321,433,434],{"class":416}," BookResource\n",[321,436,438],{"class":323,"line":437},9,[321,439,440],{"class":341},"    {\n",[321,442,443,447,451,454,456,459,462,465,468,471,474,477,479,481,484],{"class":323,"line":29},[321,444,446],{"class":445},"sVHd0","        return",[321,448,450],{"class":449},"sw1J6"," new",[321,452,453],{"class":416}," BookResource",[321,455,413],{"class":341},[321,457,458],{"class":416},"Book",[321,460,461],{"class":430},"::",[321,463,464],{"class":409},"query",[321,466,467],{"class":341},"()",[321,469,470],{"class":430},"->",[321,472,473],{"class":409},"create",[321,475,476],{"class":341},"($",[321,478,424],{"class":423},[321,480,470],{"class":430},[321,482,483],{"class":409},"validated",[321,485,486],{"class":341},"()));\n",[321,488,490],{"class":323,"line":489},11,[321,491,492],{"class":341},"    }\n",[321,494,496],{"class":323,"line":495},12,[321,497,498],{"class":341},"}\n",[500,501,502,515],"table",{},[503,504,505],"thead",{},[506,507,508,512],"tr",{},[509,510,511],"th",{},"What the generator reads",[509,513,514],{},"What it writes",[516,517,518,529,537,547,563],"tbody",{},[506,519,520,526],{},[521,522,523],"td",{},[318,524,525],{},"Route::post('api\u002Fbooks', …)->middleware('auth:sanctum')",[521,527,528],{},"the path, the operation id, the Sanctum security scheme and a 401",[506,530,531,534],{},[521,532,533],{},"The PHPDoc",[521,535,536],{},"the summary (first line) and the description (the rest)",[506,538,539,544],{},[521,540,541],{},[318,542,543],{},"StoreBookRequest::rules()",[521,545,546],{},"the request body, with every constraint, and a 422",[506,548,549,555],{},[521,550,551,552],{},"The return type ",[318,553,554],{},"BookResource",[521,556,557,558,560,561],{},"a 201 with the ",[318,559,458],{}," component, built by running the resource on a sampled ",[318,562,458],{},[506,564,565,570],{},[521,566,567],{},[318,568,569],{},"@throws DuplicateIsbnException",[521,571,572],{},"the error response the exception declares",[574,575,577],"h2",{"id":576},"compatibility","Compatibility",[576,579],{},[302,581,582,583,308],{},"Upgrading from 0.6? Follow the ",[306,584,585],{"href":290},"upgrade guide",[574,587,589],{"id":588},"next","Next",[302,591,592,595,596,308],{},[306,593,594],{"href":129},"Install the package",", then follow the\n",[306,597,598],{"href":133},"quick start",[600,601,602],"style",{},"html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--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 .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sp_-d, html code.shiki .sp_-d{--shiki-light:#F76D47;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .slwOJ, html code.shiki .slwOJ{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#005CC5;--shiki-default-font-style:inherit;--shiki-dark:#79B8FF;--shiki-dark-font-style:inherit}html pre.shiki code .sfi6f, html code.shiki .sfi6f{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#005CC5;--shiki-default-font-style:inherit;--shiki-dark:#79B8FF;--shiki-dark-font-style:inherit}html pre.shiki code .sCdfi, html code.shiki .sCdfi{--shiki-light:#E2931D;--shiki-light-font-style:italic;--shiki-default:#005CC5;--shiki-default-font-style:inherit;--shiki-dark:#79B8FF;--shiki-dark-font-style:inherit}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--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 .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}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);}",{"title":316,"searchDepth":345,"depth":345,"links":604},[605,606],{"id":576,"depth":338,"text":577},{"id":588,"depth":338,"text":589},"Generate the OpenAPI documents of a Laravel application from the code it already has.","md",{},true,"---\ntitle: Introduction\ndescription: Generate the OpenAPI documents of a Laravel application from the code it already has.\n---\n\nLaravel OpenAPI Generator writes the OpenAPI documents of your Laravel application from what the application already\ndeclares: its routes and their middlewares, the signatures and the PHPDoc of the actions, the form requests and their\nvalidation rules, and the API resources, which it runs on sampled models. PHP attributes complete what the code cannot\ntell. Each document is written in the OpenAPI version you choose (3.0, 3.1 or 3.2) with\n[OpenAPI Writer](\u002Fopenapi-writer).\n\n```php [app\u002FHttp\u002FControllers\u002FBookController.php]\nfinal class BookController\n{\n    \u002F**\n     * Add a book.\n     *\n     * @throws \\App\\Exceptions\\DuplicateIsbnException\n     *\u002F\n    public function store(StoreBookRequest $request): BookResource\n    {\n        return new BookResource(Book::query()->create($request->validated()));\n    }\n}\n```\n\n| What the generator reads | What it writes |\n| --- | --- |\n| `Route::post('api\u002Fbooks', …)->middleware('auth:sanctum')` | the path, the operation id, the Sanctum security scheme and a 401 |\n| The PHPDoc | the summary (first line) and the description (the rest) |\n| `StoreBookRequest::rules()` | the request body, with every constraint, and a 422 |\n| The return type `BookResource` | a 201 with the `Book` component, built by running the resource on a sampled `Book` |\n| `@throws DuplicateIsbnException` | the error response the exception declares |\n\n## Compatibility\n\n::compatibility\n::\n\nUpgrading from 0.6? Follow the [upgrade guide](\u002Flaravel-openapi-generator\u002Fupgrade).\n\n## Next\n\n[Install the package](\u002Flaravel-openapi-generator\u002Fgetting-started\u002Finstallation), then follow the\n[quick start](\u002Flaravel-openapi-generator\u002Fgetting-started\u002Fquick-start).\n",{"title":125,"description":607},"DYgsL-NcHsHm-lsvtGns7-qEzhpirYhxNxW7-tvcEMQ",[118,615],{"title":128,"path":129,"stem":130,"description":616,"children":-1},"Require the package, publish its configuration and add the optional dependencies.",1795438899353]