[{"data":1,"prerenderedAt":1765},["ShallowReactive",2],{"libs":3,"navigation-laravel-openapi-generator":115,"\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Froutes-and-operations":296,"\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Froutes-and-operations-surround":1760},[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":146,"body":298,"description":1754,"experimental":119,"extension":1755,"links":118,"meta":1756,"navigation":723,"path":147,"rawbody":1757,"seo":1758,"since":118,"stem":148,"__hash__":1759},"laravel_openapi_generator\u002Flaravel-openapi-generator\u002F2.documenting-endpoints\u002F2.routes-and-operations.md",{"type":299,"value":300,"toc":1743},"minimark",[301,305,310,326,504,522,625,635,638,684,794,804,808,811,929,942,957,964,1108,1112,1115,1161,1167,1284,1308,1318,1322,1353,1417,1427,1497,1502,1553,1557,1569,1637,1659,1663,1677,1681,1732,1739],[302,303,304],"p",{},"Each route of a document becomes one operation per HTTP method. This page covers which routes are documented and the\nmetadata of their operations: summary, description, tags, operation id and deprecation.",[306,307,309],"h2",{"id":308},"choose-the-routes","Choose the routes",[302,311,312,313,317,318,321,322,325],{},"The routes of a document are those matching ",[314,315,316],"code",{},"routes.include"," and none of ",[314,319,320],{},"routes.exclude",". By default, every route\nunder ",[314,323,324],{},"api\u002F",":",[327,328,334],"pre",{"className":329,"code":330,"filename":331,"language":332,"meta":333,"style":333},"language-php shiki shiki-themes material-theme-lighter github-light github-dark","'documents' => [\n    'v1' => [\n        'routes' => [\n            'include' => ['api\u002F*'],\n            'exclude' => ['api\u002Finternal\u002F*'],\n            'ignored_methods' => ['HEAD'],\n            'order' => 'registration',   \u002F\u002F or 'path'\n        ],\n    ],\n],\n","config\u002Fopenapi.php","php","",[314,335,336,359,374,389,415,438,461,488,494,500],{"__ignoreMap":333},[337,338,341,345,349,351,355],"span",{"class":339,"line":340},"line",1,[337,342,344],{"class":343},"sjJ54","'",[337,346,348],{"class":347},"s_sjI","documents",[337,350,344],{"class":343},[337,352,354],{"class":353},"smGrS"," =>",[337,356,358],{"class":357},"sP7_E"," [\n",[337,360,362,365,368,370,372],{"class":339,"line":361},2,[337,363,364],{"class":343},"    '",[337,366,367],{"class":347},"v1",[337,369,344],{"class":343},[337,371,354],{"class":353},[337,373,358],{"class":357},[337,375,377,380,383,385,387],{"class":339,"line":376},3,[337,378,379],{"class":343},"        '",[337,381,382],{"class":347},"routes",[337,384,344],{"class":343},[337,386,354],{"class":353},[337,388,358],{"class":357},[337,390,392,395,398,400,402,405,407,410,412],{"class":339,"line":391},4,[337,393,394],{"class":343},"            '",[337,396,397],{"class":347},"include",[337,399,344],{"class":343},[337,401,354],{"class":353},[337,403,404],{"class":357}," [",[337,406,344],{"class":343},[337,408,409],{"class":347},"api\u002F*",[337,411,344],{"class":343},[337,413,414],{"class":357},"],\n",[337,416,418,420,423,425,427,429,431,434,436],{"class":339,"line":417},5,[337,419,394],{"class":343},[337,421,422],{"class":347},"exclude",[337,424,344],{"class":343},[337,426,354],{"class":353},[337,428,404],{"class":357},[337,430,344],{"class":343},[337,432,433],{"class":347},"api\u002Finternal\u002F*",[337,435,344],{"class":343},[337,437,414],{"class":357},[337,439,441,443,446,448,450,452,454,457,459],{"class":339,"line":440},6,[337,442,394],{"class":343},[337,444,445],{"class":347},"ignored_methods",[337,447,344],{"class":343},[337,449,354],{"class":353},[337,451,404],{"class":357},[337,453,344],{"class":343},[337,455,456],{"class":347},"HEAD",[337,458,344],{"class":343},[337,460,414],{"class":357},[337,462,464,466,469,471,473,476,479,481,484],{"class":339,"line":463},7,[337,465,394],{"class":343},[337,467,468],{"class":347},"order",[337,470,344],{"class":343},[337,472,354],{"class":353},[337,474,475],{"class":343}," '",[337,477,478],{"class":347},"registration",[337,480,344],{"class":343},[337,482,483],{"class":357},",",[337,485,487],{"class":486},"sutJx","   \u002F\u002F or 'path'\n",[337,489,491],{"class":339,"line":490},8,[337,492,493],{"class":357},"        ],\n",[337,495,497],{"class":339,"line":496},9,[337,498,499],{"class":357},"    ],\n",[337,501,502],{"class":339,"line":29},[337,503,414],{"class":357},[302,505,506,507,510,511,510,514,517,518,521],{},"The masks are shell masks on the URI. To match on something else, give a map of masks by ",[314,508,509],{},"uri",", ",[314,512,513],{},"name",[314,515,516],{},"domain"," and\n",[314,519,520],{},"middleware"," (a declared name or a class); a route matches when one mask matches it:",[327,523,525],{"className":329,"code":524,"filename":331,"language":332,"meta":333,"style":333},"'routes' => [\n    'include' => ['uri' => ['api\u002F*'], 'middleware' => ['auth:sanctum']],\n    'exclude' => ['name' => ['*.debug']],\n],\n",[314,526,527,539,590,621],{"__ignoreMap":333},[337,528,529,531,533,535,537],{"class":339,"line":340},[337,530,344],{"class":343},[337,532,382],{"class":347},[337,534,344],{"class":343},[337,536,354],{"class":353},[337,538,358],{"class":357},[337,540,541,543,545,547,549,551,553,555,557,559,561,563,565,567,570,572,574,576,578,580,582,585,587],{"class":339,"line":361},[337,542,364],{"class":343},[337,544,397],{"class":347},[337,546,344],{"class":343},[337,548,354],{"class":353},[337,550,404],{"class":357},[337,552,344],{"class":343},[337,554,509],{"class":347},[337,556,344],{"class":343},[337,558,354],{"class":353},[337,560,404],{"class":357},[337,562,344],{"class":343},[337,564,409],{"class":347},[337,566,344],{"class":343},[337,568,569],{"class":357},"],",[337,571,475],{"class":343},[337,573,520],{"class":347},[337,575,344],{"class":343},[337,577,354],{"class":353},[337,579,404],{"class":357},[337,581,344],{"class":343},[337,583,584],{"class":347},"auth:sanctum",[337,586,344],{"class":343},[337,588,589],{"class":357},"]],\n",[337,591,592,594,596,598,600,602,604,606,608,610,612,614,617,619],{"class":339,"line":376},[337,593,364],{"class":343},[337,595,422],{"class":347},[337,597,344],{"class":343},[337,599,354],{"class":353},[337,601,404],{"class":357},[337,603,344],{"class":343},[337,605,513],{"class":347},[337,607,344],{"class":343},[337,609,354],{"class":353},[337,611,404],{"class":357},[337,613,344],{"class":343},[337,615,616],{"class":347},"*.debug",[337,618,344],{"class":343},[337,620,589],{"class":357},[337,622,623],{"class":339,"line":391},[337,624,414],{"class":357},[302,626,627,628,630,631,634],{},"An empty ",[314,629,397],{}," (or ",[314,632,633],{},"null",") keeps every route.",[302,636,637],{},"Some routes are never documented:",[639,640,641,666,677],"ul",{},[642,643,644,645,648,649,510,652,655,656,510,659,510,662,665],"li",{},"the internal routes of Laravel and of common packages, listed in ",[314,646,647],{},"routes.internal"," (",[314,650,651],{},"up",[314,653,654],{},"sanctum\u002Fcsrf-cookie",",\n",[314,657,658],{},"telescope\u002F*",[314,660,661],{},"horizon\u002F*",[314,663,664],{},"livewire\u002F*","…); remove an entry from the list to document it;",[642,667,668,669,672,673,676],{},"redirects (",[314,670,671],{},"Route::redirect()","), views (",[314,674,675],{},"Route::view()",") and the fallback route;",[642,678,679,680,683],{},"a controller, an action or a closure marked ",[314,681,682],{},"#[Exclude]",".",[327,685,688],{"className":329,"code":686,"filename":687,"language":332,"meta":333,"style":333},"use Ark4ne\\OpenApi\\Attributes\\Exclude;\n\nfinal class UserController\n{\n    #[Exclude]\n    public function debug(): array\n    {\n        \u002F\u002F …\n    }\n}\n","app\u002FHttp\u002FControllers\u002FUserController.php",[314,689,690,719,725,738,743,754,774,779,784,789],{"__ignoreMap":333},[337,691,692,696,700,704,707,709,711,713,716],{"class":339,"line":340},[337,693,695],{"class":694},"sw1J6","use",[337,697,699],{"class":698},"s_hVV"," Ark4ne",[337,701,703],{"class":702},"s39Yj","\\",[337,705,706],{"class":698},"OpenApi",[337,708,703],{"class":702},[337,710,269],{"class":698},[337,712,703],{"class":702},[337,714,715],{"class":698},"Exclude",[337,717,718],{"class":357},";\n",[337,720,721],{"class":339,"line":361},[337,722,724],{"emptyLinePlaceholder":723},true,"\n",[337,726,727,731,734],{"class":339,"line":376},[337,728,730],{"class":729},"sbsja","final",[337,732,733],{"class":729}," class",[337,735,737],{"class":736},"sbgvK"," UserController\n",[337,739,740],{"class":339,"line":391},[337,741,742],{"class":357},"{\n",[337,744,745,749,751],{"class":339,"line":417},[337,746,748],{"class":747},"su5hD","    #[",[337,750,715],{"class":698},[337,752,753],{"class":747},"]\n",[337,755,756,759,762,766,769,771],{"class":339,"line":440},[337,757,758],{"class":729},"    public",[337,760,761],{"class":729}," function",[337,763,765],{"class":764},"sGLFI"," debug",[337,767,768],{"class":357},"()",[337,770,325],{"class":353},[337,772,773],{"class":694}," array\n",[337,775,776],{"class":339,"line":463},[337,777,778],{"class":357},"    {\n",[337,780,781],{"class":339,"line":490},[337,782,783],{"class":486},"        \u002F\u002F …\n",[337,785,786],{"class":339,"line":496},[337,787,788],{"class":357},"    }\n",[337,790,791],{"class":339,"line":29},[337,792,793],{"class":357},"}\n",[795,796,797],"tip",{},[302,798,799,800,803],{},"A route missing from the document? ",[314,801,802],{},"php artisan openapi:inspect \u003Croute>"," says whether it is in the document.",[306,805,807],{"id":806},"paths-and-path-parameters","Paths and path parameters",[302,809,810],{},"The URI of the route is the path. Its parameters are typed from what the route and the action declare:",[812,813,814,827],"table",{},[815,816,817],"thead",{},[818,819,820,824],"tr",{},[821,822,823],"th",{},"Declaration",[821,825,826],{},"Schema of the parameter",[828,829,830,844,862,877,905,920],"tbody",{},[818,831,832,839],{},[833,834,835,838],"td",{},[314,836,837],{},"int $user"," in the action",[833,840,841],{},[314,842,843],{},"integer",[818,845,846,852],{},[833,847,848,851],{},[314,849,850],{},"User $user",", a bound model",[833,853,854,855,857,858,861],{},"the type of its route key (",[314,856,843],{}," for ",[314,859,860],{},"id","), and a 404",[818,863,864,870],{},[833,865,866,869],{},[314,867,868],{},"Status $status",", a backed enum",[833,871,872,873,876],{},"a reference to the ",[314,874,875],{},"Status"," component, and a 404",[818,878,879,890],{},[833,880,881,510,884,510,887],{},[314,882,883],{},"->whereNumber('user')",[314,885,886],{},"->whereUuid()",[314,888,889],{},"->whereIn()",[833,891,892,510,894,897,898,901,902],{},[314,893,843],{},[314,895,896],{},"string"," with ",[314,899,900],{},"format: uuid",", an ",[314,903,904],{},"enum",[818,906,907,913],{},[833,908,909,912],{},[314,910,911],{},"{post:slug}",", a custom binding key",[833,914,915,916,919],{},"the type of ",[314,917,918],{},"slug","; the key is removed from the path",[818,921,922,925],{},[833,923,924],{},"Anything else",[833,926,927],{},[314,928,896],{},[302,930,931,932,935,936,517,939,683],{},"An optional parameter at the end of the URI gives two paths: ",[314,933,934],{},"users\u002F{user?}"," is documented as ",[314,937,938],{},"\u002Fapi\u002Fusers",[314,940,941],{},"\u002Fapi\u002Fusers\u002F{user}",[302,943,944,945,948,949,952,953,956],{},"A domain (",[314,946,947],{},"Route::domain('{account}.example.com')",") gives the operation its own server,\n",[314,950,951],{},"https:\u002F\u002F{account}.example.com",", with ",[314,954,955],{},"account"," as a server variable.",[302,958,959,960,963],{},"To describe a path parameter, use ",[314,961,962],{},"#[PathParameter]"," on the action:",[327,965,967],{"className":329,"code":966,"language":332,"meta":333,"style":333},"use Ark4ne\\OpenApi\\Attributes\\PathParameter;\n\n#[PathParameter(\n    'catalog',\n    type: 'non-empty-string',\n    description: 'Catalog code',\n    example: 'fr',\n)]\npublic function search(SearchRequest $request, string $catalog): array\n",[314,968,969,990,994,1004,1015,1031,1047,1063,1070],{"__ignoreMap":333},[337,970,971,973,975,977,979,981,983,985,988],{"class":339,"line":340},[337,972,695],{"class":694},[337,974,699],{"class":698},[337,976,703],{"class":702},[337,978,706],{"class":698},[337,980,703],{"class":702},[337,982,269],{"class":698},[337,984,703],{"class":702},[337,986,987],{"class":698},"PathParameter",[337,989,718],{"class":357},[337,991,992],{"class":339,"line":361},[337,993,724],{"emptyLinePlaceholder":723},[337,995,996,999,1001],{"class":339,"line":376},[337,997,998],{"class":747},"#[",[337,1000,987],{"class":698},[337,1002,1003],{"class":357},"(\n",[337,1005,1006,1008,1011,1013],{"class":339,"line":391},[337,1007,364],{"class":343},[337,1009,1010],{"class":347},"catalog",[337,1012,344],{"class":343},[337,1014,655],{"class":357},[337,1016,1017,1020,1022,1024,1027,1029],{"class":339,"line":417},[337,1018,1019],{"class":736},"    type",[337,1021,325],{"class":357},[337,1023,475],{"class":343},[337,1025,1026],{"class":347},"non-empty-string",[337,1028,344],{"class":343},[337,1030,655],{"class":357},[337,1032,1033,1036,1038,1040,1043,1045],{"class":339,"line":440},[337,1034,1035],{"class":736},"    description",[337,1037,325],{"class":357},[337,1039,475],{"class":343},[337,1041,1042],{"class":347},"Catalog code",[337,1044,344],{"class":343},[337,1046,655],{"class":357},[337,1048,1049,1052,1054,1056,1059,1061],{"class":339,"line":463},[337,1050,1051],{"class":736},"    example",[337,1053,325],{"class":357},[337,1055,475],{"class":343},[337,1057,1058],{"class":347},"fr",[337,1060,344],{"class":343},[337,1062,655],{"class":357},[337,1064,1065,1068],{"class":339,"line":490},[337,1066,1067],{"class":357},")",[337,1069,753],{"class":747},[337,1071,1072,1075,1077,1080,1083,1087,1090,1093,1095,1098,1100,1102,1104,1106],{"class":339,"line":496},[337,1073,1074],{"class":729},"public",[337,1076,761],{"class":729},[337,1078,1079],{"class":764}," search",[337,1081,1082],{"class":357},"(",[337,1084,1086],{"class":1085},"sZMiF","SearchRequest",[337,1088,1089],{"class":357}," $",[337,1091,1092],{"class":747},"request",[337,1094,483],{"class":357},[337,1096,1097],{"class":694}," string",[337,1099,1089],{"class":357},[337,1101,1010],{"class":747},[337,1103,1067],{"class":357},[337,1105,325],{"class":353},[337,1107,773],{"class":694},[306,1109,1111],{"id":1110},"summary-and-description","Summary and description",[302,1113,1114],{},"The PHPDoc of the action gives them: the first line is the summary, the rest is the description (CommonMark).",[327,1116,1118],{"className":329,"code":1117,"language":332,"meta":333,"style":333},"\u002F**\n * List the users.\n *\n * Sorted by name. Only the **active** users are listed.\n *\u002F\npublic function index(): AnonymousResourceCollection\n",[314,1119,1120,1125,1130,1135,1140,1145],{"__ignoreMap":333},[337,1121,1122],{"class":339,"line":340},[337,1123,1124],{"class":486},"\u002F**\n",[337,1126,1127],{"class":339,"line":361},[337,1128,1129],{"class":486}," * List the users.\n",[337,1131,1132],{"class":339,"line":376},[337,1133,1134],{"class":486}," *\n",[337,1136,1137],{"class":339,"line":391},[337,1138,1139],{"class":486}," * Sorted by name. Only the **active** users are listed.\n",[337,1141,1142],{"class":339,"line":417},[337,1143,1144],{"class":486}," *\u002F\n",[337,1146,1147,1149,1151,1154,1156,1158],{"class":339,"line":440},[337,1148,1074],{"class":729},[337,1150,761],{"class":729},[337,1152,1153],{"class":764}," index",[337,1155,768],{"class":357},[337,1157,325],{"class":353},[337,1159,1160],{"class":1085}," AnonymousResourceCollection\n",[302,1162,1163,1166],{},[314,1164,1165],{},"#[Operation]"," replaces them, on the action or on the controller (where it fills only what the action leaves empty):",[327,1168,1170],{"className":329,"code":1169,"language":332,"meta":333,"style":333},"use Ark4ne\\OpenApi\\Attributes\\Operation;\n\n#[Operation(\n    summary: 'Fetch a user',\n    description: 'Returns the profile of a user.',\n    operationId: 'getUser',\n)]\npublic function show(User $user): UserResource\n",[314,1171,1172,1193,1197,1205,1221,1236,1252,1258],{"__ignoreMap":333},[337,1173,1174,1176,1178,1180,1182,1184,1186,1188,1191],{"class":339,"line":340},[337,1175,695],{"class":694},[337,1177,699],{"class":698},[337,1179,703],{"class":702},[337,1181,706],{"class":698},[337,1183,703],{"class":702},[337,1185,269],{"class":698},[337,1187,703],{"class":702},[337,1189,1190],{"class":698},"Operation",[337,1192,718],{"class":357},[337,1194,1195],{"class":339,"line":361},[337,1196,724],{"emptyLinePlaceholder":723},[337,1198,1199,1201,1203],{"class":339,"line":376},[337,1200,998],{"class":747},[337,1202,1190],{"class":698},[337,1204,1003],{"class":357},[337,1206,1207,1210,1212,1214,1217,1219],{"class":339,"line":391},[337,1208,1209],{"class":736},"    summary",[337,1211,325],{"class":357},[337,1213,475],{"class":343},[337,1215,1216],{"class":347},"Fetch a user",[337,1218,344],{"class":343},[337,1220,655],{"class":357},[337,1222,1223,1225,1227,1229,1232,1234],{"class":339,"line":417},[337,1224,1035],{"class":736},[337,1226,325],{"class":357},[337,1228,475],{"class":343},[337,1230,1231],{"class":347},"Returns the profile of a user.",[337,1233,344],{"class":343},[337,1235,655],{"class":357},[337,1237,1238,1241,1243,1245,1248,1250],{"class":339,"line":440},[337,1239,1240],{"class":736},"    operationId",[337,1242,325],{"class":357},[337,1244,475],{"class":343},[337,1246,1247],{"class":347},"getUser",[337,1249,344],{"class":343},[337,1251,655],{"class":357},[337,1253,1254,1256],{"class":339,"line":463},[337,1255,1067],{"class":357},[337,1257,753],{"class":747},[337,1259,1260,1262,1264,1267,1269,1272,1274,1277,1279,1281],{"class":339,"line":490},[337,1261,1074],{"class":729},[337,1263,761],{"class":729},[337,1265,1266],{"class":764}," show",[337,1268,1082],{"class":357},[337,1270,1271],{"class":1085},"User",[337,1273,1089],{"class":357},[337,1275,1276],{"class":747},"user",[337,1278,1067],{"class":357},[337,1280,325],{"class":353},[337,1282,1283],{"class":1085}," UserResource\n",[302,1285,1286,1287,1290,1291,1294,1295,1297,1298,1300,1301,648,1304,1307],{},"Without PHPDoc nor attribute, the summary comes from ",[314,1288,1289],{},"strategies.summary",": ",[314,1292,1293],{},"doc"," (the default, none without PHPDoc),\n",[314,1296,513],{}," (the route name), ",[314,1299,509],{}," or ",[314,1302,1303],{},"controller",[314,1305,1306],{},"UserController@show",").",[302,1309,1310,1311,1314,1315,683],{},"With ",[314,1312,1313],{},"languages"," configured, the summary, the description and the tags may be translation keys; see\n",[1316,1317,188],"a",{"href":189},[306,1319,1321],{"id":1320},"tags","Tags",[302,1323,1324,1325,897,1328,1331,1332,1335,1336,1339,1340,1342,1343,1339,1346,1349,1350,683],{},"By default, an operation is tagged by its controller: ",[314,1326,1327],{},"strategies.tags",[314,1329,1330],{},"by: controller"," and a ",[314,1333,1334],{},"pattern"," whose\nfirst group is the tag. With the published configuration, ",[314,1337,1338],{},"App\\Http\\Controllers\\UserController"," is tagged ",[314,1341,1271],{},",\nand ",[314,1344,1345],{},"App\\Http\\Controllers\\Admin\\UserController",[314,1347,1348],{},"Admin\\User",". A controller the pattern does not match is\ntagged by its class name without ",[314,1351,1352],{},"Controller",[812,1354,1355,1377],{},[815,1356,1357],{},[818,1358,1359,1364],{},[821,1360,1361],{},[314,1362,1363],{},"strategies.tags.by",[821,1365,1366,1367,1370,1371,510,1374],{},"Tag of ",[314,1368,1369],{},"GET \u002Fapi\u002Fv1\u002Fusers\u002F{user}",", route ",[314,1372,1373],{},"api.users.show",[314,1375,1376],{},"UserController",[828,1378,1379,1389,1405],{},[818,1380,1381,1385],{},[833,1382,1383],{},[314,1384,1303],{},[833,1386,1387],{},[314,1388,1271],{},[818,1390,1391,1395],{},[833,1392,1393],{},[314,1394,509],{},[833,1396,1397,1400,1401,1404],{},[314,1398,1399],{},"users",": the first segment after ",[314,1402,1403],{},"api"," and the version",[818,1406,1407,1411],{},[833,1408,1409],{},[314,1410,513],{},[833,1412,1413,1400,1415],{},[314,1414,1399],{},[314,1416,1403],{},[302,1418,1419,1422,1423,1426],{},[314,1420,1421],{},"#[Tag]"," adds a tag and describes it; ",[314,1424,1425],{},"#[Operation(tags: [...])]"," replaces the tags of the strategy:",[327,1428,1430],{"className":329,"code":1429,"language":332,"meta":333,"style":333},"use Ark4ne\\OpenApi\\Attributes\\Tag;\n\n#[Tag('users', description: 'The accounts of the shop')]\nfinal class UserController\n",[314,1431,1432,1453,1457,1489],{"__ignoreMap":333},[337,1433,1434,1436,1438,1440,1442,1444,1446,1448,1451],{"class":339,"line":340},[337,1435,695],{"class":694},[337,1437,699],{"class":698},[337,1439,703],{"class":702},[337,1441,706],{"class":698},[337,1443,703],{"class":702},[337,1445,269],{"class":698},[337,1447,703],{"class":702},[337,1449,1450],{"class":698},"Tag",[337,1452,718],{"class":357},[337,1454,1455],{"class":339,"line":361},[337,1456,724],{"emptyLinePlaceholder":723},[337,1458,1459,1461,1463,1465,1467,1469,1471,1473,1476,1478,1480,1483,1485,1487],{"class":339,"line":376},[337,1460,998],{"class":747},[337,1462,1450],{"class":698},[337,1464,1082],{"class":357},[337,1466,344],{"class":343},[337,1468,1399],{"class":347},[337,1470,344],{"class":343},[337,1472,483],{"class":357},[337,1474,1475],{"class":736}," description",[337,1477,325],{"class":357},[337,1479,475],{"class":343},[337,1481,1482],{"class":347},"The accounts of the shop",[337,1484,344],{"class":343},[337,1486,1067],{"class":357},[337,1488,753],{"class":747},[337,1490,1491,1493,1495],{"class":339,"line":391},[337,1492,730],{"class":729},[337,1494,733],{"class":729},[337,1496,737],{"class":736},[1498,1499,1501],"h3",{"id":1500},"tag-groups","Tag groups",[302,1503,1504,1505,1508,1509,1512,1513,1515,1516,510,1519,857,1522,1524,1525,718,1527,1529,1530,1533,1534,1537,1538,1541,1542,1545,1546,1549,1550,1552],{},"A tag can have a parent: ",[314,1506,1507],{},"#[Tag('users', parent: 'admin')]",", or every tag at once with ",[314,1510,1511],{},"strategies.groups","\n(",[314,1514,1303],{},": the namespace under ",[314,1517,1518],{},"Controllers",[314,1520,1521],{},"Admin",[314,1523,1345],{},"; ",[314,1526,509],{},[314,1528,513],{},"). The parent is written as ",[314,1531,1532],{},"Tag.parent"," in 3.2, and as ",[314,1535,1536],{},"x-tagGroups"," before 3.2 with\n",[314,1539,1540],{},"vendor_extensions: redoc",". ",[314,1543,1544],{},"summary"," and ",[314,1547,1548],{},"kind"," of ",[314,1551,1421],{}," are 3.2 fields.",[306,1554,1556],{"id":1555},"operation-id","Operation id",[302,1558,1559,1562,1563,1566,1567,683],{},[314,1560,1561],{},"strategies.operation_id"," names the operations. The published configuration uses ",[314,1564,1565],{},"method_name","; without the key, the\ndefault is ",[314,1568,513],{},[812,1570,1571,1590],{},[815,1572,1573],{},[818,1574,1575,1580],{},[821,1576,1577],{},[314,1578,1579],{},"by",[821,1581,1582,1370,1585,510,1588],{},[314,1583,1584],{},"GET \u002Fapi\u002Fusers\u002F{user}",[314,1586,1587],{},"users.show",[314,1589,1306],{},[828,1591,1592,1603,1613,1625],{},[818,1593,1594,1598],{},[833,1595,1596],{},[314,1597,1565],{},[833,1599,1600],{},[314,1601,1602],{},"GET:users.show",[818,1604,1605,1609],{},[833,1606,1607],{},[314,1608,513],{},[833,1610,1611],{},[314,1612,1587],{},[818,1614,1615,1620],{},[833,1616,1617],{},[314,1618,1619],{},"action",[833,1621,1622],{},[314,1623,1624],{},"UserController.show",[818,1626,1627,1632],{},[833,1628,1629],{},[314,1630,1631],{},"method_path",[833,1633,1634],{},[314,1635,1636],{},"getApiUsersByUser",[302,1638,1639,1640,1642,1643,1645,1646,1649,1650,1653,1654,1300,1656,1658],{},"A route without name (or without controller for ",[314,1641,1619],{},") falls back to ",[314,1644,1631],{},". Operation ids are unique: a\nsecond operation with the same id gets a ",[314,1647,1648],{},"_2"," suffix and a warning. A route answering several methods\n(",[314,1651,1652],{},"Route::match(['put', 'patch'], …)",") needs ",[314,1655,1565],{},[314,1657,1631],{}," to avoid it.",[306,1660,1662],{"id":1661},"deprecation","Deprecation",[302,1664,1665,1668,1669,1672,1673,1676],{},[314,1666,1667],{},"@deprecated"," in the PHPDoc, or PHP's native ",[314,1670,1671],{},"#[\\Deprecated]",", marks the operation deprecated;\n",[314,1674,1675],{},"#[Operation(deprecated: false)]"," overrides both.",[306,1678,1680],{"id":1679},"external-documentation","External documentation",[327,1682,1684],{"className":329,"code":1683,"language":332,"meta":333,"style":333},"#[Operation(\n    externalDocs: 'https:\u002F\u002Fdocs.example.com\u002Fusers',\n    externalDocsDescription: 'The user guide',\n)]\n",[314,1685,1686,1694,1710,1726],{"__ignoreMap":333},[337,1687,1688,1690,1692],{"class":339,"line":340},[337,1689,998],{"class":747},[337,1691,1190],{"class":698},[337,1693,1003],{"class":357},[337,1695,1696,1699,1701,1703,1706,1708],{"class":339,"line":361},[337,1697,1698],{"class":736},"    externalDocs",[337,1700,325],{"class":357},[337,1702,475],{"class":343},[337,1704,1705],{"class":347},"https:\u002F\u002Fdocs.example.com\u002Fusers",[337,1707,344],{"class":343},[337,1709,655],{"class":357},[337,1711,1712,1715,1717,1719,1722,1724],{"class":339,"line":376},[337,1713,1714],{"class":736},"    externalDocsDescription",[337,1716,325],{"class":357},[337,1718,475],{"class":343},[337,1720,1721],{"class":347},"The user guide",[337,1723,344],{"class":343},[337,1725,655],{"class":357},[337,1727,1728,1730],{"class":339,"line":391},[337,1729,1067],{"class":357},[337,1731,753],{"class":747},[302,1733,1734,1735,1738],{},"The document's own external documentation is ",[314,1736,1737],{},"external_docs"," in its configuration.",[1740,1741,1742],"style",{},"html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}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 .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 .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}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 .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}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}",{"title":333,"searchDepth":376,"depth":376,"links":1744},[1745,1746,1747,1748,1751,1752,1753],{"id":308,"depth":361,"text":309},{"id":806,"depth":361,"text":807},{"id":1110,"depth":361,"text":1111},{"id":1320,"depth":361,"text":1321,"children":1749},[1750],{"id":1500,"depth":376,"text":1501},{"id":1555,"depth":361,"text":1556},{"id":1661,"depth":361,"text":1662},{"id":1679,"depth":361,"text":1680},"Choose the routes of a document, and give each operation its summary, description, tags and identifier.","md",{},"---\ntitle: Routes & operations\ndescription: Choose the routes of a document, and give each operation its summary, description, tags and identifier.\n---\n\nEach route of a document becomes one operation per HTTP method. This page covers which routes are documented and the\nmetadata of their operations: summary, description, tags, operation id and deprecation.\n\n## Choose the routes\n\nThe routes of a document are those matching `routes.include` and none of `routes.exclude`. By default, every route\nunder `api\u002F`:\n\n```php [config\u002Fopenapi.php]\n'documents' => [\n    'v1' => [\n        'routes' => [\n            'include' => ['api\u002F*'],\n            'exclude' => ['api\u002Finternal\u002F*'],\n            'ignored_methods' => ['HEAD'],\n            'order' => 'registration',   \u002F\u002F or 'path'\n        ],\n    ],\n],\n```\n\nThe masks are shell masks on the URI. To match on something else, give a map of masks by `uri`, `name`, `domain` and\n`middleware` (a declared name or a class); a route matches when one mask matches it:\n\n```php [config\u002Fopenapi.php]\n'routes' => [\n    'include' => ['uri' => ['api\u002F*'], 'middleware' => ['auth:sanctum']],\n    'exclude' => ['name' => ['*.debug']],\n],\n```\n\nAn empty `include` (or `null`) keeps every route.\n\nSome routes are never documented:\n\n- the internal routes of Laravel and of common packages, listed in `routes.internal` (`up`, `sanctum\u002Fcsrf-cookie`,\n  `telescope\u002F*`, `horizon\u002F*`, `livewire\u002F*`…); remove an entry from the list to document it;\n- redirects (`Route::redirect()`), views (`Route::view()`) and the fallback route;\n- a controller, an action or a closure marked `#[Exclude]`.\n\n```php [app\u002FHttp\u002FControllers\u002FUserController.php]\nuse Ark4ne\\OpenApi\\Attributes\\Exclude;\n\nfinal class UserController\n{\n    #[Exclude]\n    public function debug(): array\n    {\n        \u002F\u002F …\n    }\n}\n```\n\n::tip\nA route missing from the document? `php artisan openapi:inspect \u003Croute>` says whether it is in the document.\n::\n\n## Paths and path parameters\n\nThe URI of the route is the path. Its parameters are typed from what the route and the action declare:\n\n| Declaration | Schema of the parameter |\n| --- | --- |\n| `int $user` in the action | `integer` |\n| `User $user`, a bound model | the type of its route key (`integer` for `id`), and a 404 |\n| `Status $status`, a backed enum | a reference to the `Status` component, and a 404 |\n| `->whereNumber('user')`, `->whereUuid()`, `->whereIn()` | `integer`, `string` with `format: uuid`, an `enum` |\n| `{post:slug}`, a custom binding key | the type of `slug`; the key is removed from the path |\n| Anything else | `string` |\n\nAn optional parameter at the end of the URI gives two paths: `users\u002F{user?}` is documented as `\u002Fapi\u002Fusers` and\n`\u002Fapi\u002Fusers\u002F{user}`.\n\nA domain (`Route::domain('{account}.example.com')`) gives the operation its own server,\n`https:\u002F\u002F{account}.example.com`, with `account` as a server variable.\n\nTo describe a path parameter, use `#[PathParameter]` on the action:\n\n```php\nuse Ark4ne\\OpenApi\\Attributes\\PathParameter;\n\n#[PathParameter(\n    'catalog',\n    type: 'non-empty-string',\n    description: 'Catalog code',\n    example: 'fr',\n)]\npublic function search(SearchRequest $request, string $catalog): array\n```\n\n## Summary and description\n\nThe PHPDoc of the action gives them: the first line is the summary, the rest is the description (CommonMark).\n\n```php\n\u002F**\n * List the users.\n *\n * Sorted by name. Only the **active** users are listed.\n *\u002F\npublic function index(): AnonymousResourceCollection\n```\n\n`#[Operation]` replaces them, on the action or on the controller (where it fills only what the action leaves empty):\n\n```php\nuse Ark4ne\\OpenApi\\Attributes\\Operation;\n\n#[Operation(\n    summary: 'Fetch a user',\n    description: 'Returns the profile of a user.',\n    operationId: 'getUser',\n)]\npublic function show(User $user): UserResource\n```\n\nWithout PHPDoc nor attribute, the summary comes from `strategies.summary`: `doc` (the default, none without PHPDoc),\n`name` (the route name), `uri` or `controller` (`UserController@show`).\n\nWith `languages` configured, the summary, the description and the tags may be translation keys; see\n[Translations](\u002Flaravel-openapi-generator\u002Fdocuments\u002Ftranslations).\n\n## Tags\n\nBy default, an operation is tagged by its controller: `strategies.tags` with `by: controller` and a `pattern` whose\nfirst group is the tag. With the published configuration, `App\\Http\\Controllers\\UserController` is tagged `User`,\nand `App\\Http\\Controllers\\Admin\\UserController` is tagged `Admin\\User`. A controller the pattern does not match is\ntagged by its class name without `Controller`.\n\n| `strategies.tags.by` | Tag of `GET \u002Fapi\u002Fv1\u002Fusers\u002F{user}`, route `api.users.show`, `UserController` |\n| --- | --- |\n| `controller` | `User` |\n| `uri` | `users`: the first segment after `api` and the version |\n| `name` | `users`: the first segment after `api` |\n\n`#[Tag]` adds a tag and describes it; `#[Operation(tags: [...])]` replaces the tags of the strategy:\n\n```php\nuse Ark4ne\\OpenApi\\Attributes\\Tag;\n\n#[Tag('users', description: 'The accounts of the shop')]\nfinal class UserController\n```\n\n### Tag groups\n\nA tag can have a parent: `#[Tag('users', parent: 'admin')]`, or every tag at once with `strategies.groups`\n(`controller`: the namespace under `Controllers`, `Admin` for `App\\Http\\Controllers\\Admin\\UserController`; `uri`;\n`name`). The parent is written as `Tag.parent` in 3.2, and as `x-tagGroups` before 3.2 with\n`vendor_extensions: redoc`. `summary` and `kind` of `#[Tag]` are 3.2 fields.\n\n## Operation id\n\n`strategies.operation_id` names the operations. The published configuration uses `method_name`; without the key, the\ndefault is `name`.\n\n| `by` | `GET \u002Fapi\u002Fusers\u002F{user}`, route `users.show`, `UserController@show` |\n| --- | --- |\n| `method_name` | `GET:users.show` |\n| `name` | `users.show` |\n| `action` | `UserController.show` |\n| `method_path` | `getApiUsersByUser` |\n\nA route without name (or without controller for `action`) falls back to `method_path`. Operation ids are unique: a\nsecond operation with the same id gets a `_2` suffix and a warning. A route answering several methods\n(`Route::match(['put', 'patch'], …)`) needs `method_name` or `method_path` to avoid it.\n\n## Deprecation\n\n`@deprecated` in the PHPDoc, or PHP's native `#[\\Deprecated]`, marks the operation deprecated;\n`#[Operation(deprecated: false)]` overrides both.\n\n## External documentation\n\n```php\n#[Operation(\n    externalDocs: 'https:\u002F\u002Fdocs.example.com\u002Fusers',\n    externalDocsDescription: 'The user guide',\n)]\n```\n\nThe document's own external documentation is `external_docs` in its configuration.\n",{"title":146,"description":1754},"pwjfXCGUbTanjRCyy8MI_lTWr5RDi3WbUmzkipvMo8I",[1761,1763],{"title":142,"path":143,"stem":144,"description":1762,"children":-1},"What the generator reads in your application, in which order, and where attributes take over.",{"title":150,"path":151,"stem":152,"description":1764,"children":-1},"Document query parameters, request bodies, headers and cookies from form requests and attributes.",1795438903254]