[{"data":1,"prerenderedAt":3057},["ShallowReactive",2],{"libs":3,"navigation-laravel-openapi-generator":115,"\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Frequests":296,"\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Frequests-surround":3052},[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":150,"body":298,"description":3046,"experimental":119,"extension":3047,"links":118,"meta":3048,"navigation":1794,"path":151,"rawbody":3049,"seo":3050,"since":118,"stem":152,"__hash__":3051},"laravel_openapi_generator\u002Flaravel-openapi-generator\u002F2.documenting-endpoints\u002F3.requests.md",{"type":299,"value":300,"toc":3038},"minimark",[301,319,324,327,977,1053,1060,1070,1074,1077,1600,1606,1705,1721,1725,1737,1947,1972,1976,1982,2224,2236,2343,2347,2354,2763,2773,2777,2783,2998,3034],[302,303,304,305,309,310,314,315,318],"p",{},"The parameters and the body of an operation come from the ",[306,307,308],"strong",{},"form request"," of its action: its ",[311,312,313],"code",{},"rules()"," are read and\nturned into schemas. Attributes and ",[311,316,317],{},"DescribesRequest"," add what the rules do not say: headers, cookies, other media\ntypes.",[320,321,323],"h2",{"id":322},"form-requests","Form requests",[302,325,326],{},"Type the form request in the action; its rules give the fields:",[328,329,332,553],"example",{"input":330,"output":331},"app\u002FHttp\u002FRequests\u002FStoreAvatarRequest.php","requestBody",[333,334,336],"template",{"v-slot:input":335},"",[337,338,342],"pre",{"className":339,"code":340,"language":341,"meta":335,"style":335},"language-php shiki shiki-themes material-theme-lighter github-light github-dark","final class StoreAvatarRequest extends FormRequest\n{\n    public function rules(): array\n    {\n        return [\n            'avatar' => ['required', File::image()->max(2048)],\n            'caption' => 'nullable|string|max:120',\n            'publish_at' => 'sometimes|date_format:Y-m-d',\n            'company' => 'required_if:type,business|string',\n        ];\n    }\n}\n","php",[311,343,344,366,373,397,403,413,471,494,515,536,541,547],{"__ignoreMap":335},[345,346,349,353,356,360,363],"span",{"class":347,"line":348},"line",1,[345,350,352],{"class":351},"sbsja","final",[345,354,355],{"class":351}," class",[345,357,359],{"class":358},"sbgvK"," StoreAvatarRequest",[345,361,362],{"class":351}," extends",[345,364,365],{"class":358}," FormRequest\n",[345,367,369],{"class":347,"line":368},2,[345,370,372],{"class":371},"sP7_E","{\n",[345,374,376,379,382,386,389,393],{"class":347,"line":375},3,[345,377,378],{"class":351},"    public",[345,380,381],{"class":351}," function",[345,383,385],{"class":384},"sGLFI"," rules",[345,387,388],{"class":371},"()",[345,390,392],{"class":391},"smGrS",":",[345,394,396],{"class":395},"sw1J6"," array\n",[345,398,400],{"class":347,"line":399},4,[345,401,402],{"class":371},"    {\n",[345,404,406,410],{"class":347,"line":405},5,[345,407,409],{"class":408},"sVHd0","        return",[345,411,412],{"class":371}," [\n",[345,414,416,420,424,427,430,433,435,438,440,443,447,450,453,455,458,461,464,468],{"class":347,"line":415},6,[345,417,419],{"class":418},"sjJ54","            '",[345,421,423],{"class":422},"s_sjI","avatar",[345,425,426],{"class":418},"'",[345,428,429],{"class":391}," =>",[345,431,432],{"class":371}," [",[345,434,426],{"class":418},[345,436,437],{"class":422},"required",[345,439,426],{"class":418},[345,441,442],{"class":371},",",[345,444,446],{"class":445},"sZMiF"," File",[345,448,449],{"class":391},"::",[345,451,452],{"class":384},"image",[345,454,388],{"class":371},[345,456,457],{"class":391},"->",[345,459,460],{"class":384},"max",[345,462,463],{"class":371},"(",[345,465,467],{"class":466},"srdBf","2048",[345,469,470],{"class":371},")],\n",[345,472,474,476,479,481,483,486,489,491],{"class":347,"line":473},7,[345,475,419],{"class":418},[345,477,478],{"class":422},"caption",[345,480,426],{"class":418},[345,482,429],{"class":391},[345,484,485],{"class":418}," '",[345,487,488],{"class":422},"nullable|string|max:120",[345,490,426],{"class":418},[345,492,493],{"class":371},",\n",[345,495,497,499,502,504,506,508,511,513],{"class":347,"line":496},8,[345,498,419],{"class":418},[345,500,501],{"class":422},"publish_at",[345,503,426],{"class":418},[345,505,429],{"class":391},[345,507,485],{"class":418},[345,509,510],{"class":422},"sometimes|date_format:Y-m-d",[345,512,426],{"class":418},[345,514,493],{"class":371},[345,516,518,520,523,525,527,529,532,534],{"class":347,"line":517},9,[345,519,419],{"class":418},[345,521,522],{"class":422},"company",[345,524,426],{"class":418},[345,526,429],{"class":391},[345,528,485],{"class":418},[345,530,531],{"class":422},"required_if:type,business|string",[345,533,426],{"class":418},[345,535,493],{"class":371},[345,537,538],{"class":347,"line":29},[345,539,540],{"class":371},"        ];\n",[345,542,544],{"class":347,"line":543},11,[345,545,546],{"class":371},"    }\n",[345,548,550],{"class":347,"line":549},12,[345,551,552],{"class":371},"}\n",[333,554,555],{"v-slot:output":335},[337,556,560],{"className":557,"code":558,"language":559,"meta":335,"style":335},"language-json shiki shiki-themes material-theme-lighter github-light github-dark","{\n  \"required\": true,\n  \"content\": {\n    \"multipart\u002Fform-data\": {\n      \"schema\": {\n        \"type\": \"object\",\n        \"required\": [\"avatar\"],\n        \"properties\": {\n          \"avatar\": { \"type\": \"string\", \"format\": \"binary\", \"description\": \"At most 2048 KB.\" },\n          \"caption\": { \"type\": [\"string\", \"null\"], \"maxLength\": 120 },\n          \"publish_at\": { \"type\": \"string\", \"format\": \"date\" },\n          \"company\": { \"type\": \"string\", \"description\": \"Required if type is business.\" }\n        }\n      },\n      \"encoding\": {\n        \"avatar\": { \"contentType\": \"image\u002Fjpeg, image\u002Fpng, image\u002Fbmp, image\u002Fgif, image\u002Fwebp\" }\n      }\n    }\n  }\n}\n","json",[311,561,562,566,585,599,613,627,650,671,684,754,808,853,899,905,911,925,956,962,967,973],{"__ignoreMap":335},[345,563,564],{"class":347,"line":348},[345,565,372],{"class":371},[345,567,568,572,575,578,580,583],{"class":347,"line":368},[345,569,571],{"class":570},"s39Yj","  \"",[345,573,437],{"class":574},"sseR_",[345,576,577],{"class":570},"\"",[345,579,392],{"class":371},[345,581,582],{"class":570}," true",[345,584,493],{"class":371},[345,586,587,589,592,594,596],{"class":347,"line":375},[345,588,571],{"class":570},[345,590,591],{"class":574},"content",[345,593,577],{"class":570},[345,595,392],{"class":371},[345,597,598],{"class":371}," {\n",[345,600,601,604,607,609,611],{"class":347,"line":399},[345,602,603],{"class":570},"    \"",[345,605,606],{"class":445},"multipart\u002Fform-data",[345,608,577],{"class":570},[345,610,392],{"class":371},[345,612,598],{"class":371},[345,614,615,618,621,623,625],{"class":347,"line":405},[345,616,617],{"class":570},"      \"",[345,619,620],{"class":466},"schema",[345,622,577],{"class":570},[345,624,392],{"class":371},[345,626,598],{"class":371},[345,628,629,632,636,638,640,643,646,648],{"class":347,"line":415},[345,630,631],{"class":570},"        \"",[345,633,635],{"class":634},"swQdS","type",[345,637,577],{"class":570},[345,639,392],{"class":371},[345,641,642],{"class":418}," \"",[345,644,645],{"class":422},"object",[345,647,577],{"class":418},[345,649,493],{"class":371},[345,651,652,654,656,658,660,662,664,666,668],{"class":347,"line":473},[345,653,631],{"class":570},[345,655,437],{"class":634},[345,657,577],{"class":570},[345,659,392],{"class":371},[345,661,432],{"class":371},[345,663,577],{"class":418},[345,665,423],{"class":422},[345,667,577],{"class":418},[345,669,670],{"class":371},"],\n",[345,672,673,675,678,680,682],{"class":347,"line":496},[345,674,631],{"class":570},[345,676,677],{"class":634},"properties",[345,679,577],{"class":570},[345,681,392],{"class":371},[345,683,598],{"class":371},[345,685,686,689,692,694,696,699,701,704,706,708,710,713,715,717,719,722,724,726,728,731,733,735,737,740,742,744,746,749,751],{"class":347,"line":517},[345,687,688],{"class":570},"          \"",[345,690,423],{"class":691},"sAQsV",[345,693,577],{"class":570},[345,695,392],{"class":371},[345,697,698],{"class":371}," {",[345,700,642],{"class":570},[345,702,635],{"class":703},"sptTA",[345,705,577],{"class":570},[345,707,392],{"class":371},[345,709,642],{"class":418},[345,711,712],{"class":422},"string",[345,714,577],{"class":418},[345,716,442],{"class":371},[345,718,642],{"class":570},[345,720,721],{"class":703},"format",[345,723,577],{"class":570},[345,725,392],{"class":371},[345,727,642],{"class":418},[345,729,730],{"class":422},"binary",[345,732,577],{"class":418},[345,734,442],{"class":371},[345,736,642],{"class":570},[345,738,739],{"class":703},"description",[345,741,577],{"class":570},[345,743,392],{"class":371},[345,745,642],{"class":418},[345,747,748],{"class":422},"At most 2048 KB.",[345,750,577],{"class":418},[345,752,753],{"class":371}," },\n",[345,755,756,758,760,762,764,766,768,770,772,774,776,778,780,782,784,786,789,791,794,796,799,801,803,806],{"class":347,"line":29},[345,757,688],{"class":570},[345,759,478],{"class":691},[345,761,577],{"class":570},[345,763,392],{"class":371},[345,765,698],{"class":371},[345,767,642],{"class":570},[345,769,635],{"class":703},[345,771,577],{"class":570},[345,773,392],{"class":371},[345,775,432],{"class":371},[345,777,577],{"class":418},[345,779,712],{"class":422},[345,781,577],{"class":418},[345,783,442],{"class":371},[345,785,642],{"class":418},[345,787,788],{"class":422},"null",[345,790,577],{"class":418},[345,792,793],{"class":371},"],",[345,795,642],{"class":570},[345,797,798],{"class":703},"maxLength",[345,800,577],{"class":570},[345,802,392],{"class":371},[345,804,805],{"class":466}," 120",[345,807,753],{"class":371},[345,809,810,812,814,816,818,820,822,824,826,828,830,832,834,836,838,840,842,844,846,849,851],{"class":347,"line":543},[345,811,688],{"class":570},[345,813,501],{"class":691},[345,815,577],{"class":570},[345,817,392],{"class":371},[345,819,698],{"class":371},[345,821,642],{"class":570},[345,823,635],{"class":703},[345,825,577],{"class":570},[345,827,392],{"class":371},[345,829,642],{"class":418},[345,831,712],{"class":422},[345,833,577],{"class":418},[345,835,442],{"class":371},[345,837,642],{"class":570},[345,839,721],{"class":703},[345,841,577],{"class":570},[345,843,392],{"class":371},[345,845,642],{"class":418},[345,847,848],{"class":422},"date",[345,850,577],{"class":418},[345,852,753],{"class":371},[345,854,855,857,859,861,863,865,867,869,871,873,875,877,879,881,883,885,887,889,891,894,896],{"class":347,"line":549},[345,856,688],{"class":570},[345,858,522],{"class":691},[345,860,577],{"class":570},[345,862,392],{"class":371},[345,864,698],{"class":371},[345,866,642],{"class":570},[345,868,635],{"class":703},[345,870,577],{"class":570},[345,872,392],{"class":371},[345,874,642],{"class":418},[345,876,712],{"class":422},[345,878,577],{"class":418},[345,880,442],{"class":371},[345,882,642],{"class":570},[345,884,739],{"class":703},[345,886,577],{"class":570},[345,888,392],{"class":371},[345,890,642],{"class":418},[345,892,893],{"class":422},"Required if type is business.",[345,895,577],{"class":418},[345,897,898],{"class":371}," }\n",[345,900,902],{"class":347,"line":901},13,[345,903,904],{"class":371},"        }\n",[345,906,908],{"class":347,"line":907},14,[345,909,910],{"class":371},"      },\n",[345,912,914,916,919,921,923],{"class":347,"line":913},15,[345,915,617],{"class":570},[345,917,918],{"class":466},"encoding",[345,920,577],{"class":570},[345,922,392],{"class":371},[345,924,598],{"class":371},[345,926,928,930,932,934,936,938,940,943,945,947,949,952,954],{"class":347,"line":927},16,[345,929,631],{"class":570},[345,931,423],{"class":634},[345,933,577],{"class":570},[345,935,392],{"class":371},[345,937,698],{"class":371},[345,939,642],{"class":570},[345,941,942],{"class":691},"contentType",[345,944,577],{"class":570},[345,946,392],{"class":371},[345,948,642],{"class":418},[345,950,951],{"class":422},"image\u002Fjpeg, image\u002Fpng, image\u002Fbmp, image\u002Fgif, image\u002Fwebp",[345,953,577],{"class":418},[345,955,898],{"class":371},[345,957,959],{"class":347,"line":958},17,[345,960,961],{"class":371},"      }\n",[345,963,965],{"class":347,"line":964},18,[345,966,546],{"class":371},[345,968,970],{"class":347,"line":969},19,[345,971,972],{"class":371},"  }\n",[345,974,975],{"class":347,"line":58},[345,976,552],{"class":371},[978,979,980,1004,1017,1033,1043],"ul",{},[981,982,983,984,987,988,991,992,995,996,999,1000,1003],"li",{},"The fields go to the ",[306,985,986],{},"query"," for ",[311,989,990],{},"GET",", ",[311,993,994],{},"HEAD"," and ",[311,997,998],{},"DELETE",", to the ",[306,1001,1002],{},"body"," otherwise.",[981,1005,1006,1007,1010,1011,1013,1014,1016],{},"The body is ",[311,1008,1009],{},"application\u002Fjson",", or ",[311,1012,606],{}," as soon as a field is a file; the types of the files give\nthe ",[311,1015,918],{},".",[981,1018,1019,1021,1022,1025,1026,991,1029,1032],{},[311,1020,437],{}," makes the field required; ",[311,1023,1024],{},"sometimes"," cancels it; ",[311,1027,1028],{},"required_if",[311,1030,1031],{},"required_with"," and the other\nconditions leave it optional and write the condition in its description.",[981,1034,1035,1036,991,1039,1042],{},"Nested fields (",[311,1037,1038],{},"address.city",[311,1040,1041],{},"tags.*",") give nested objects and lists.",[981,1044,1045,1046,1049,1050,1016],{},"A request that redefines ",[311,1047,1048],{},"authorize()"," adds a 403; a request with rules adds a 422. See\n",[1051,1052,162],"a",{"href":163},[302,1054,1055,1056,1059],{},"Every supported rule and the schema it gives are listed in the\n",[1051,1057,1058],{"href":278},"validation rules reference",". An unknown rule keeps the field\nand is reported as an info; a closure rule is ignored with an info.",[1061,1062,1063],"warning",{},[302,1064,1065,1066,1069],{},"Only form requests are read. Rules validated in the controller (",[311,1067,1068],{},"$request->validate([...])",") are invisible to the\ngenerator: move them to a form request.",[320,1071,1073],{"id":1072},"query-parameters","Query parameters",[302,1075,1076],{},"In the query, every key is its own parameter. A nested key is written with brackets:",[328,1078,1081,1217],{"input":1079,"output":1080},"app\u002FHttp\u002FRequests\u002FListPostsRequest.php","parameters",[333,1082,1083],{"v-slot:input":335},[337,1084,1086],{"className":339,"code":1085,"language":341,"meta":335,"style":335},"public function rules(): array\n{\n    return [\n        'q' => 'required|string|min:2',\n        'filter.status' => [Rule::enum(Status::class)],\n        'filter.author' => 'integer',\n        'sort' => 'in:title,-title,date,-date',\n    ];\n}\n",[311,1087,1088,1103,1107,1114,1135,1168,1188,1208,1213],{"__ignoreMap":335},[345,1089,1090,1093,1095,1097,1099,1101],{"class":347,"line":348},[345,1091,1092],{"class":351},"public",[345,1094,381],{"class":351},[345,1096,385],{"class":384},[345,1098,388],{"class":371},[345,1100,392],{"class":391},[345,1102,396],{"class":395},[345,1104,1105],{"class":347,"line":368},[345,1106,372],{"class":371},[345,1108,1109,1112],{"class":347,"line":375},[345,1110,1111],{"class":408},"    return",[345,1113,412],{"class":371},[345,1115,1116,1119,1122,1124,1126,1128,1131,1133],{"class":347,"line":399},[345,1117,1118],{"class":418},"        '",[345,1120,1121],{"class":422},"q",[345,1123,426],{"class":418},[345,1125,429],{"class":391},[345,1127,485],{"class":418},[345,1129,1130],{"class":422},"required|string|min:2",[345,1132,426],{"class":418},[345,1134,493],{"class":371},[345,1136,1137,1139,1142,1144,1146,1148,1151,1153,1156,1158,1161,1163,1166],{"class":347,"line":405},[345,1138,1118],{"class":418},[345,1140,1141],{"class":422},"filter.status",[345,1143,426],{"class":418},[345,1145,429],{"class":391},[345,1147,432],{"class":371},[345,1149,1150],{"class":445},"Rule",[345,1152,449],{"class":391},[345,1154,1155],{"class":384},"enum",[345,1157,463],{"class":371},[345,1159,1160],{"class":445},"Status",[345,1162,449],{"class":391},[345,1164,1165],{"class":395},"class",[345,1167,470],{"class":371},[345,1169,1170,1172,1175,1177,1179,1181,1184,1186],{"class":347,"line":415},[345,1171,1118],{"class":418},[345,1173,1174],{"class":422},"filter.author",[345,1176,426],{"class":418},[345,1178,429],{"class":391},[345,1180,485],{"class":418},[345,1182,1183],{"class":422},"integer",[345,1185,426],{"class":418},[345,1187,493],{"class":371},[345,1189,1190,1192,1195,1197,1199,1201,1204,1206],{"class":347,"line":473},[345,1191,1118],{"class":418},[345,1193,1194],{"class":422},"sort",[345,1196,426],{"class":418},[345,1198,429],{"class":391},[345,1200,485],{"class":418},[345,1202,1203],{"class":422},"in:title,-title,date,-date",[345,1205,426],{"class":418},[345,1207,493],{"class":371},[345,1209,1210],{"class":347,"line":496},[345,1211,1212],{"class":371},"    ];\n",[345,1214,1215],{"class":347,"line":517},[345,1216,552],{"class":371},[333,1218,1219],{"v-slot:output":335},[337,1220,1222],{"className":557,"code":1221,"language":559,"meta":335,"style":335},"[\n  { \"name\": \"q\", \"in\": \"query\", \"required\": true, \"schema\": { \"type\": \"string\", \"minLength\": 2 } },\n  { \"name\": \"filter[status]\", \"in\": \"query\", \"schema\": { \"type\": \"string\", \"enum\": [\"draft\", \"published\"] } },\n  { \"name\": \"filter[author]\", \"in\": \"query\", \"schema\": { \"type\": \"integer\" } },\n  { \"name\": \"sort\", \"in\": \"query\", \"schema\": { \"type\": \"string\", \"enum\": [\"title\", \"-title\", \"date\", \"-date\"] } }\n]\n",[311,1223,1224,1229,1323,1419,1484,1595],{"__ignoreMap":335},[345,1225,1226],{"class":347,"line":348},[345,1227,1228],{"class":371},"[\n",[345,1230,1231,1234,1236,1239,1241,1243,1245,1247,1249,1251,1253,1256,1258,1260,1262,1264,1266,1268,1270,1272,1274,1276,1278,1280,1282,1284,1286,1288,1290,1292,1294,1296,1298,1300,1302,1304,1306,1308,1311,1313,1315,1318,1321],{"class":347,"line":368},[345,1232,1233],{"class":371},"  {",[345,1235,642],{"class":570},[345,1237,1238],{"class":574},"name",[345,1240,577],{"class":570},[345,1242,392],{"class":371},[345,1244,642],{"class":418},[345,1246,1121],{"class":422},[345,1248,577],{"class":418},[345,1250,442],{"class":371},[345,1252,642],{"class":570},[345,1254,1255],{"class":574},"in",[345,1257,577],{"class":570},[345,1259,392],{"class":371},[345,1261,642],{"class":418},[345,1263,986],{"class":422},[345,1265,577],{"class":418},[345,1267,442],{"class":371},[345,1269,642],{"class":570},[345,1271,437],{"class":574},[345,1273,577],{"class":570},[345,1275,392],{"class":371},[345,1277,582],{"class":570},[345,1279,442],{"class":371},[345,1281,642],{"class":570},[345,1283,620],{"class":574},[345,1285,577],{"class":570},[345,1287,392],{"class":371},[345,1289,698],{"class":371},[345,1291,642],{"class":570},[345,1293,635],{"class":445},[345,1295,577],{"class":570},[345,1297,392],{"class":371},[345,1299,642],{"class":418},[345,1301,712],{"class":422},[345,1303,577],{"class":418},[345,1305,442],{"class":371},[345,1307,642],{"class":570},[345,1309,1310],{"class":445},"minLength",[345,1312,577],{"class":570},[345,1314,392],{"class":371},[345,1316,1317],{"class":466}," 2",[345,1319,1320],{"class":371}," }",[345,1322,753],{"class":371},[345,1324,1325,1327,1329,1331,1333,1335,1337,1340,1342,1344,1346,1348,1350,1352,1354,1356,1358,1360,1362,1364,1366,1368,1370,1372,1374,1376,1378,1380,1382,1384,1386,1388,1390,1392,1394,1396,1398,1401,1403,1405,1407,1410,1412,1415,1417],{"class":347,"line":375},[345,1326,1233],{"class":371},[345,1328,642],{"class":570},[345,1330,1238],{"class":574},[345,1332,577],{"class":570},[345,1334,392],{"class":371},[345,1336,642],{"class":418},[345,1338,1339],{"class":422},"filter[status]",[345,1341,577],{"class":418},[345,1343,442],{"class":371},[345,1345,642],{"class":570},[345,1347,1255],{"class":574},[345,1349,577],{"class":570},[345,1351,392],{"class":371},[345,1353,642],{"class":418},[345,1355,986],{"class":422},[345,1357,577],{"class":418},[345,1359,442],{"class":371},[345,1361,642],{"class":570},[345,1363,620],{"class":574},[345,1365,577],{"class":570},[345,1367,392],{"class":371},[345,1369,698],{"class":371},[345,1371,642],{"class":570},[345,1373,635],{"class":445},[345,1375,577],{"class":570},[345,1377,392],{"class":371},[345,1379,642],{"class":418},[345,1381,712],{"class":422},[345,1383,577],{"class":418},[345,1385,442],{"class":371},[345,1387,642],{"class":570},[345,1389,1155],{"class":445},[345,1391,577],{"class":570},[345,1393,392],{"class":371},[345,1395,432],{"class":371},[345,1397,577],{"class":418},[345,1399,1400],{"class":422},"draft",[345,1402,577],{"class":418},[345,1404,442],{"class":371},[345,1406,642],{"class":418},[345,1408,1409],{"class":422},"published",[345,1411,577],{"class":418},[345,1413,1414],{"class":371},"]",[345,1416,1320],{"class":371},[345,1418,753],{"class":371},[345,1420,1421,1423,1425,1427,1429,1431,1433,1436,1438,1440,1442,1444,1446,1448,1450,1452,1454,1456,1458,1460,1462,1464,1466,1468,1470,1472,1474,1476,1478,1480,1482],{"class":347,"line":399},[345,1422,1233],{"class":371},[345,1424,642],{"class":570},[345,1426,1238],{"class":574},[345,1428,577],{"class":570},[345,1430,392],{"class":371},[345,1432,642],{"class":418},[345,1434,1435],{"class":422},"filter[author]",[345,1437,577],{"class":418},[345,1439,442],{"class":371},[345,1441,642],{"class":570},[345,1443,1255],{"class":574},[345,1445,577],{"class":570},[345,1447,392],{"class":371},[345,1449,642],{"class":418},[345,1451,986],{"class":422},[345,1453,577],{"class":418},[345,1455,442],{"class":371},[345,1457,642],{"class":570},[345,1459,620],{"class":574},[345,1461,577],{"class":570},[345,1463,392],{"class":371},[345,1465,698],{"class":371},[345,1467,642],{"class":570},[345,1469,635],{"class":445},[345,1471,577],{"class":570},[345,1473,392],{"class":371},[345,1475,642],{"class":418},[345,1477,1183],{"class":422},[345,1479,577],{"class":418},[345,1481,1320],{"class":371},[345,1483,753],{"class":371},[345,1485,1486,1488,1490,1492,1494,1496,1498,1500,1502,1504,1506,1508,1510,1512,1514,1516,1518,1520,1522,1524,1526,1528,1530,1532,1534,1536,1538,1540,1542,1544,1546,1548,1550,1552,1554,1556,1558,1561,1563,1565,1567,1570,1572,1574,1576,1578,1580,1582,1584,1587,1589,1591,1593],{"class":347,"line":405},[345,1487,1233],{"class":371},[345,1489,642],{"class":570},[345,1491,1238],{"class":574},[345,1493,577],{"class":570},[345,1495,392],{"class":371},[345,1497,642],{"class":418},[345,1499,1194],{"class":422},[345,1501,577],{"class":418},[345,1503,442],{"class":371},[345,1505,642],{"class":570},[345,1507,1255],{"class":574},[345,1509,577],{"class":570},[345,1511,392],{"class":371},[345,1513,642],{"class":418},[345,1515,986],{"class":422},[345,1517,577],{"class":418},[345,1519,442],{"class":371},[345,1521,642],{"class":570},[345,1523,620],{"class":574},[345,1525,577],{"class":570},[345,1527,392],{"class":371},[345,1529,698],{"class":371},[345,1531,642],{"class":570},[345,1533,635],{"class":445},[345,1535,577],{"class":570},[345,1537,392],{"class":371},[345,1539,642],{"class":418},[345,1541,712],{"class":422},[345,1543,577],{"class":418},[345,1545,442],{"class":371},[345,1547,642],{"class":570},[345,1549,1155],{"class":445},[345,1551,577],{"class":570},[345,1553,392],{"class":371},[345,1555,432],{"class":371},[345,1557,577],{"class":418},[345,1559,1560],{"class":422},"title",[345,1562,577],{"class":418},[345,1564,442],{"class":371},[345,1566,642],{"class":418},[345,1568,1569],{"class":422},"-title",[345,1571,577],{"class":418},[345,1573,442],{"class":371},[345,1575,642],{"class":418},[345,1577,848],{"class":422},[345,1579,577],{"class":418},[345,1581,442],{"class":371},[345,1583,642],{"class":418},[345,1585,1586],{"class":422},"-date",[345,1588,577],{"class":418},[345,1590,1414],{"class":371},[345,1592,1320],{"class":371},[345,1594,898],{"class":371},[345,1596,1597],{"class":347,"line":415},[345,1598,1599],{"class":371},"]\n",[302,1601,1602,1605],{},[311,1603,1604],{},"strategies.query.by"," chooses how nested fields are written:",[1607,1608,1609,1630],"table",{},[1610,1611,1612],"thead",{},[1613,1614,1615,1621],"tr",{},[1616,1617,1618],"th",{},[311,1619,1620],{},"by",[1616,1622,1623,991,1625,991,1627],{},[311,1624,1141],{},[311,1626,1174],{},[311,1628,1629],{},"ids.*",[1631,1632,1633,1652,1669,1689],"tbody",{},[1613,1634,1635,1642],{},[1636,1637,1638,1641],"td",{},[311,1639,1640],{},"all"," (default)",[1636,1643,1644,991,1646,991,1648,1651],{},[311,1645,1339],{},[311,1647,1435],{},[311,1649,1650],{},"ids[]",": one parameter per key, an object field included",[1613,1653,1654,1659],{},[1636,1655,1656],{},[311,1657,1658],{},"last",[1636,1660,1661,991,1663,991,1665,1668],{},[311,1662,1339],{},[311,1664,1435],{},[311,1666,1667],{},"ids",": the same, the last list kept as one array parameter",[1613,1670,1671,1676],{},[1636,1672,1673],{},[311,1674,1675],{},"none",[1636,1677,1678,1681,1682,1685,1686,1688],{},[311,1679,1680],{},"filter"," as one ",[311,1683,1684],{},"deepObject"," parameter, ",[311,1687,1667],{}," as an array",[1613,1690,1691,1696],{},[1636,1692,1693],{},[311,1694,1695],{},"querystring",[1636,1697,1698,1699,1701,1702,1704],{},"the whole query as one ",[311,1700,1695],{}," parameter (3.2; ",[311,1703,1675],{}," before)",[302,1706,1707,1708,1711,1712,1714,1715,1717,1718,1720],{},"An object whose keys are not all known (open ",[311,1709,1710],{},"additionalProperties",", a reference) stays a ",[311,1713,1684],{}," with ",[311,1716,1640],{}," and\n",[311,1719,1658],{},", with an info.",[320,1722,1724],{"id":1723},"headers-cookies-and-parameters-by-attribute","Headers, cookies and parameters by attribute",[302,1726,1727,991,1730,995,1733,1736],{},[311,1728,1729],{},"#[QueryParameter]",[311,1731,1732],{},"#[Header]",[311,1734,1735],{},"#[Cookie]"," add a parameter, or complete the parameter of the same name the rules\ngave. Put them on the controller, the request class or the action:",[337,1738,1740],{"className":339,"code":1739,"language":341,"meta":335,"style":335},"use Ark4ne\\OpenApi\\Attributes\\Header;\nuse Ark4ne\\OpenApi\\Attributes\\QueryParameter;\n\n#[QueryParameter('page', description: 'Page number, from 1')]\n#[QueryParameter('sort', type: \"'title'|'price'\", description: 'Sort order')]\n#[Header('X-Request-Id', type: 'string', description: 'Echoed in the response')]\npublic function index(ListPostsRequest $request): array\n",[311,1741,1742,1769,1790,1796,1832,1877,1921],{"__ignoreMap":335},[345,1743,1744,1747,1751,1754,1757,1759,1761,1763,1766],{"class":347,"line":348},[345,1745,1746],{"class":395},"use",[345,1748,1750],{"class":1749},"s_hVV"," Ark4ne",[345,1752,1753],{"class":570},"\\",[345,1755,1756],{"class":1749},"OpenApi",[345,1758,1753],{"class":570},[345,1760,269],{"class":1749},[345,1762,1753],{"class":570},[345,1764,1765],{"class":1749},"Header",[345,1767,1768],{"class":371},";\n",[345,1770,1771,1773,1775,1777,1779,1781,1783,1785,1788],{"class":347,"line":368},[345,1772,1746],{"class":395},[345,1774,1750],{"class":1749},[345,1776,1753],{"class":570},[345,1778,1756],{"class":1749},[345,1780,1753],{"class":570},[345,1782,269],{"class":1749},[345,1784,1753],{"class":570},[345,1786,1787],{"class":1749},"QueryParameter",[345,1789,1768],{"class":371},[345,1791,1792],{"class":347,"line":375},[345,1793,1795],{"emptyLinePlaceholder":1794},true,"\n",[345,1797,1798,1802,1804,1806,1808,1811,1813,1815,1818,1820,1822,1825,1827,1830],{"class":347,"line":399},[345,1799,1801],{"class":1800},"su5hD","#[",[345,1803,1787],{"class":1749},[345,1805,463],{"class":371},[345,1807,426],{"class":418},[345,1809,1810],{"class":422},"page",[345,1812,426],{"class":418},[345,1814,442],{"class":371},[345,1816,1817],{"class":358}," description",[345,1819,392],{"class":371},[345,1821,485],{"class":418},[345,1823,1824],{"class":422},"Page number, from 1",[345,1826,426],{"class":418},[345,1828,1829],{"class":371},")",[345,1831,1599],{"class":1800},[345,1833,1834,1836,1838,1840,1842,1844,1846,1848,1851,1853,1855,1858,1860,1862,1864,1866,1868,1871,1873,1875],{"class":347,"line":405},[345,1835,1801],{"class":1800},[345,1837,1787],{"class":1749},[345,1839,463],{"class":371},[345,1841,426],{"class":418},[345,1843,1194],{"class":422},[345,1845,426],{"class":418},[345,1847,442],{"class":371},[345,1849,1850],{"class":358}," type",[345,1852,392],{"class":371},[345,1854,642],{"class":418},[345,1856,1857],{"class":422},"'title'|'price'",[345,1859,577],{"class":418},[345,1861,442],{"class":371},[345,1863,1817],{"class":358},[345,1865,392],{"class":371},[345,1867,485],{"class":418},[345,1869,1870],{"class":422},"Sort order",[345,1872,426],{"class":418},[345,1874,1829],{"class":371},[345,1876,1599],{"class":1800},[345,1878,1879,1881,1883,1885,1887,1890,1892,1894,1896,1898,1900,1902,1904,1906,1908,1910,1912,1915,1917,1919],{"class":347,"line":415},[345,1880,1801],{"class":1800},[345,1882,1765],{"class":1749},[345,1884,463],{"class":371},[345,1886,426],{"class":418},[345,1888,1889],{"class":422},"X-Request-Id",[345,1891,426],{"class":418},[345,1893,442],{"class":371},[345,1895,1850],{"class":358},[345,1897,392],{"class":371},[345,1899,485],{"class":418},[345,1901,712],{"class":422},[345,1903,426],{"class":418},[345,1905,442],{"class":371},[345,1907,1817],{"class":358},[345,1909,392],{"class":371},[345,1911,485],{"class":418},[345,1913,1914],{"class":422},"Echoed in the response",[345,1916,426],{"class":418},[345,1918,1829],{"class":371},[345,1920,1599],{"class":1800},[345,1922,1923,1925,1927,1930,1932,1935,1938,1941,1943,1945],{"class":347,"line":473},[345,1924,1092],{"class":351},[345,1926,381],{"class":351},[345,1928,1929],{"class":384}," index",[345,1931,463],{"class":371},[345,1933,1934],{"class":445},"ListPostsRequest",[345,1936,1937],{"class":371}," $",[345,1939,1940],{"class":1800},"request",[345,1942,1829],{"class":371},[345,1944,392],{"class":391},[345,1946,396],{"class":395},[302,1948,1949,1950,1952,1953,1956,1957,991,1959,1962,1963,1965,1966,1968,1969,1971],{},"A parameter left ",[311,1951,788],{}," keeps its value: ",[311,1954,1955],{},"#[QueryParameter('page', description: '…')]"," keeps the schema\n(",[311,1958,1183],{},[311,1960,1961],{},"minimum: 1",") and the requirement of the ",[311,1964,1810],{}," rule. ",[311,1967,635],{}," is a PHPDoc type\n(",[1051,1970,281],{"href":282},"). A header is matched whatever the case of its name.",[320,1973,1975],{"id":1974},"describing-a-request-by-hand","Describing a request by hand",[302,1977,1978,1979,1981],{},"A form request implementing ",[311,1980,317],{}," completes or replaces what its rules describe:",[337,1983,1985],{"className":339,"code":1984,"filename":1079,"language":341,"meta":335,"style":335},"use Ark4ne\\OpenApi\\Extraction\\Requests\\DescribesRequest;\nuse Ark4ne\\OpenApi\\Extraction\\Requests\\RequestDescriber;\n\nfinal class ListPostsRequest extends FormRequest implements DescribesRequest\n{\n    public function rules(): array\n    {\n        return ['q' => 'required|string|min:2'];\n    }\n\n    public function describe(RequestDescriber $request): RequestDescriber\n    {\n        return $request\n            ->header('X-Tenant', 'required|uuid', 'Tenant of the request')\n            ->query(['include' => 'string']);\n    }\n}\n",[311,1986,1987,2012,2037,2041,2061,2065,2079,2083,2106,2110,2114,2138,2142,2151,2189,2216,2220],{"__ignoreMap":335},[345,1988,1989,1991,1993,1995,1997,1999,2002,2004,2006,2008,2010],{"class":347,"line":348},[345,1990,1746],{"class":395},[345,1992,1750],{"class":1749},[345,1994,1753],{"class":570},[345,1996,1756],{"class":1749},[345,1998,1753],{"class":570},[345,2000,2001],{"class":1749},"Extraction",[345,2003,1753],{"class":570},[345,2005,150],{"class":1749},[345,2007,1753],{"class":570},[345,2009,317],{"class":1749},[345,2011,1768],{"class":371},[345,2013,2014,2016,2018,2020,2022,2024,2026,2028,2030,2032,2035],{"class":347,"line":368},[345,2015,1746],{"class":395},[345,2017,1750],{"class":1749},[345,2019,1753],{"class":570},[345,2021,1756],{"class":1749},[345,2023,1753],{"class":570},[345,2025,2001],{"class":1749},[345,2027,1753],{"class":570},[345,2029,150],{"class":1749},[345,2031,1753],{"class":570},[345,2033,2034],{"class":1749},"RequestDescriber",[345,2036,1768],{"class":371},[345,2038,2039],{"class":347,"line":375},[345,2040,1795],{"emptyLinePlaceholder":1794},[345,2042,2043,2045,2047,2050,2052,2055,2058],{"class":347,"line":399},[345,2044,352],{"class":351},[345,2046,355],{"class":351},[345,2048,2049],{"class":358}," ListPostsRequest",[345,2051,362],{"class":351},[345,2053,2054],{"class":358}," FormRequest",[345,2056,2057],{"class":351}," implements",[345,2059,2060],{"class":358}," DescribesRequest\n",[345,2062,2063],{"class":347,"line":405},[345,2064,372],{"class":371},[345,2066,2067,2069,2071,2073,2075,2077],{"class":347,"line":415},[345,2068,378],{"class":351},[345,2070,381],{"class":351},[345,2072,385],{"class":384},[345,2074,388],{"class":371},[345,2076,392],{"class":391},[345,2078,396],{"class":395},[345,2080,2081],{"class":347,"line":473},[345,2082,402],{"class":371},[345,2084,2085,2087,2089,2091,2093,2095,2097,2099,2101,2103],{"class":347,"line":496},[345,2086,409],{"class":408},[345,2088,432],{"class":371},[345,2090,426],{"class":418},[345,2092,1121],{"class":422},[345,2094,426],{"class":418},[345,2096,429],{"class":391},[345,2098,485],{"class":418},[345,2100,1130],{"class":422},[345,2102,426],{"class":418},[345,2104,2105],{"class":371},"];\n",[345,2107,2108],{"class":347,"line":517},[345,2109,546],{"class":371},[345,2111,2112],{"class":347,"line":29},[345,2113,1795],{"emptyLinePlaceholder":1794},[345,2115,2116,2118,2120,2123,2125,2127,2129,2131,2133,2135],{"class":347,"line":543},[345,2117,378],{"class":351},[345,2119,381],{"class":351},[345,2121,2122],{"class":384}," describe",[345,2124,463],{"class":371},[345,2126,2034],{"class":445},[345,2128,1937],{"class":371},[345,2130,1940],{"class":1800},[345,2132,1829],{"class":371},[345,2134,392],{"class":391},[345,2136,2137],{"class":445}," RequestDescriber\n",[345,2139,2140],{"class":347,"line":549},[345,2141,402],{"class":371},[345,2143,2144,2146,2148],{"class":347,"line":901},[345,2145,409],{"class":408},[345,2147,1937],{"class":371},[345,2149,2150],{"class":1800},"request\n",[345,2152,2153,2156,2159,2161,2163,2166,2168,2170,2172,2175,2177,2179,2181,2184,2186],{"class":347,"line":907},[345,2154,2155],{"class":391},"            ->",[345,2157,2158],{"class":384},"header",[345,2160,463],{"class":371},[345,2162,426],{"class":418},[345,2164,2165],{"class":422},"X-Tenant",[345,2167,426],{"class":418},[345,2169,442],{"class":371},[345,2171,485],{"class":418},[345,2173,2174],{"class":422},"required|uuid",[345,2176,426],{"class":418},[345,2178,442],{"class":371},[345,2180,485],{"class":418},[345,2182,2183],{"class":422},"Tenant of the request",[345,2185,426],{"class":418},[345,2187,2188],{"class":371},")\n",[345,2190,2191,2193,2195,2198,2200,2203,2205,2207,2209,2211,2213],{"class":347,"line":913},[345,2192,2155],{"class":391},[345,2194,986],{"class":384},[345,2196,2197],{"class":371},"([",[345,2199,426],{"class":418},[345,2201,2202],{"class":422},"include",[345,2204,426],{"class":418},[345,2206,429],{"class":391},[345,2208,485],{"class":418},[345,2210,712],{"class":422},[345,2212,426],{"class":418},[345,2214,2215],{"class":371},"]);\n",[345,2217,2218],{"class":347,"line":927},[345,2219,546],{"class":371},[345,2221,2222],{"class":347,"line":958},[345,2223,552],{"class":371},[302,2225,2226,2228,2229,2231,2232,2235],{},[311,2227,2034],{}," is immutable: chain the calls and return the result. Rules are written as in ",[311,2230,313],{},"; a writer\n",[311,2233,2234],{},"Schema"," is used as it is.",[1607,2237,2238,2248],{},[1610,2239,2240],{},[1613,2241,2242,2245],{},[1616,2243,2244],{},"Method",[1616,2246,2247],{},"Adds",[1631,2249,2250,2260,2270,2280,2303,2313,2323,2333],{},[1613,2251,2252,2257],{},[1636,2253,2254],{},[311,2255,2256],{},"header($name, $rules, $description, $required)",[1636,2258,2259],{},"a header",[1613,2261,2262,2267],{},[1636,2263,2264],{},[311,2265,2266],{},"cookie($name, $rules, $description, $required)",[1636,2268,2269],{},"a cookie",[1613,2271,2272,2277],{},[1636,2273,2274],{},[311,2275,2276],{},"query(array $rules)",[1636,2278,2279],{},"query fields",[1613,2281,2282,2293],{},[1636,2283,2284,991,2287,991,2290],{},[311,2285,2286],{},"json(array $rules)",[311,2288,2289],{},"form(array $rules)",[311,2291,2292],{},"multipart(array $rules)",[1636,2294,2295,2296,991,2298,991,2301],{},"body fields of ",[311,2297,1009],{},[311,2299,2300],{},"application\u002Fx-www-form-urlencoded",[311,2302,606],{},[1613,2304,2305,2310],{},[1636,2306,2307],{},[311,2308,2309],{},"body(array $rules, ?string $mediaType)",[1636,2311,2312],{},"body fields of any media type",[1613,2314,2315,2320],{},[1636,2316,2317],{},[311,2318,2319],{},"bodySchema(Schema $schema, string $mediaType)",[1636,2321,2322],{},"a body described by a schema, replacing that media type",[1613,2324,2325,2330],{},[1636,2326,2327],{},[311,2328,2329],{},"bodyDescription(?string $description)",[1636,2331,2332],{},"the description of the body",[1613,2334,2335,2340],{},[1636,2336,2337],{},[311,2338,2339],{},"parameter(ParameterDescription $parameter)",[1636,2341,2342],{},"any parameter, replacing the one of the same name and location",[320,2344,2346],{"id":2345},"a-rule-that-describes-itself","A rule that describes itself",[302,2348,2349,2350,2353],{},"A validation rule of your application implements ",[311,2351,2352],{},"DescribesRule"," to give its schema:",[328,2355,2358,2719],{"input":2356,"output":2357},"app\u002FRules\u002FIsbn.php","schema of the field",[333,2359,2360],{"v-slot:input":335},[337,2361,2363],{"className":339,"code":2362,"language":341,"meta":335,"style":335},"use Ark4ne\\OpenApi\\Description\\FieldDescription;\nuse Ark4ne\\OpenApi\\Extraction\\Rules\\DescribesRule;\n\nfinal class Isbn implements DescribesRule, ValidationRule\n{\n    public function validate(\n        string $attribute,\n        mixed $value,\n        Closure $fail,\n    ): void {\n        if (! is_string($value)\n            || preg_match('\u002F^[0-9-]{10,17}$\u002F', $value) !== 1\n        ) {\n            $fail('The :attribute must be an ISBN.');\n        }\n    }\n\n    public function describe(FieldDescription $field): FieldDescription\n    {\n        return $field->schema(\n            $field->schema\n                ->type('string')\n                ->pattern('^[0-9-]{10,17}$'),\n        );\n    }\n}\n",[311,2364,2365,2387,2412,2416,2435,2439,2451,2463,2475,2487,2499,2520,2573,2580,2599,2603,2607,2611,2635,2639,2653,2665,2683,2703,2709,2714],{"__ignoreMap":335},[345,2366,2367,2369,2371,2373,2375,2377,2380,2382,2385],{"class":347,"line":348},[345,2368,1746],{"class":395},[345,2370,1750],{"class":1749},[345,2372,1753],{"class":570},[345,2374,1756],{"class":1749},[345,2376,1753],{"class":570},[345,2378,2379],{"class":1749},"Description",[345,2381,1753],{"class":570},[345,2383,2384],{"class":1749},"FieldDescription",[345,2386,1768],{"class":371},[345,2388,2389,2391,2393,2395,2397,2399,2401,2403,2406,2408,2410],{"class":347,"line":368},[345,2390,1746],{"class":395},[345,2392,1750],{"class":1749},[345,2394,1753],{"class":570},[345,2396,1756],{"class":1749},[345,2398,1753],{"class":570},[345,2400,2001],{"class":1749},[345,2402,1753],{"class":570},[345,2404,2405],{"class":1749},"Rules",[345,2407,1753],{"class":570},[345,2409,2352],{"class":1749},[345,2411,1768],{"class":371},[345,2413,2414],{"class":347,"line":375},[345,2415,1795],{"emptyLinePlaceholder":1794},[345,2417,2418,2420,2422,2425,2427,2430,2432],{"class":347,"line":399},[345,2419,352],{"class":351},[345,2421,355],{"class":351},[345,2423,2424],{"class":358}," Isbn",[345,2426,2057],{"class":351},[345,2428,2429],{"class":358}," DescribesRule",[345,2431,442],{"class":371},[345,2433,2434],{"class":358}," ValidationRule\n",[345,2436,2437],{"class":347,"line":405},[345,2438,372],{"class":371},[345,2440,2441,2443,2445,2448],{"class":347,"line":415},[345,2442,378],{"class":351},[345,2444,381],{"class":351},[345,2446,2447],{"class":384}," validate",[345,2449,2450],{"class":371},"(\n",[345,2452,2453,2456,2458,2461],{"class":347,"line":473},[345,2454,2455],{"class":395},"        string",[345,2457,1937],{"class":371},[345,2459,2460],{"class":1800},"attribute",[345,2462,493],{"class":371},[345,2464,2465,2468,2470,2473],{"class":347,"line":496},[345,2466,2467],{"class":395},"        mixed",[345,2469,1937],{"class":371},[345,2471,2472],{"class":1800},"value",[345,2474,493],{"class":371},[345,2476,2477,2480,2482,2485],{"class":347,"line":517},[345,2478,2479],{"class":445},"        Closure",[345,2481,1937],{"class":371},[345,2483,2484],{"class":1800},"fail",[345,2486,493],{"class":371},[345,2488,2489,2492,2494,2497],{"class":347,"line":29},[345,2490,2491],{"class":371},"    )",[345,2493,392],{"class":391},[345,2495,2496],{"class":395}," void",[345,2498,598],{"class":371},[345,2500,2501,2504,2507,2510,2513,2516,2518],{"class":347,"line":543},[345,2502,2503],{"class":408},"        if",[345,2505,2506],{"class":371}," (",[345,2508,2509],{"class":391},"!",[345,2511,2512],{"class":703}," is_string",[345,2514,2515],{"class":371},"($",[345,2517,2472],{"class":1800},[345,2519,2188],{"class":371},[345,2521,2522,2525,2528,2530,2533,2536,2540,2544,2547,2550,2553,2556,2559,2561,2563,2565,2567,2570],{"class":347,"line":549},[345,2523,2524],{"class":391},"            ||",[345,2526,2527],{"class":703}," preg_match",[345,2529,463],{"class":371},[345,2531,2532],{"class":418},"'\u002F",[345,2534,2535],{"class":391},"^",[345,2537,2539],{"class":2538},"s-KJb","[",[345,2541,2543],{"class":2542},"sQRbd","0-9-",[345,2545,2546],{"class":2538},"]{",[345,2548,2549],{"class":2542},"10,17",[345,2551,2552],{"class":2538},"}",[345,2554,2555],{"class":391},"$",[345,2557,2558],{"class":418},"\u002F'",[345,2560,442],{"class":371},[345,2562,1937],{"class":371},[345,2564,2472],{"class":1800},[345,2566,1829],{"class":371},[345,2568,2569],{"class":391}," !==",[345,2571,2572],{"class":466}," 1\n",[345,2574,2575,2578],{"class":347,"line":901},[345,2576,2577],{"class":371},"        )",[345,2579,598],{"class":371},[345,2581,2582,2585,2587,2589,2591,2594,2596],{"class":347,"line":907},[345,2583,2584],{"class":371},"            $",[345,2586,2484],{"class":1800},[345,2588,463],{"class":371},[345,2590,426],{"class":418},[345,2592,2593],{"class":422},"The :attribute must be an ISBN.",[345,2595,426],{"class":418},[345,2597,2598],{"class":371},");\n",[345,2600,2601],{"class":347,"line":913},[345,2602,904],{"class":371},[345,2604,2605],{"class":347,"line":927},[345,2606,546],{"class":371},[345,2608,2609],{"class":347,"line":958},[345,2610,1795],{"emptyLinePlaceholder":1794},[345,2612,2613,2615,2617,2619,2621,2623,2625,2628,2630,2632],{"class":347,"line":964},[345,2614,378],{"class":351},[345,2616,381],{"class":351},[345,2618,2122],{"class":384},[345,2620,463],{"class":371},[345,2622,2384],{"class":445},[345,2624,1937],{"class":371},[345,2626,2627],{"class":1800},"field",[345,2629,1829],{"class":371},[345,2631,392],{"class":391},[345,2633,2634],{"class":445}," FieldDescription\n",[345,2636,2637],{"class":347,"line":969},[345,2638,402],{"class":371},[345,2640,2641,2643,2645,2647,2649,2651],{"class":347,"line":58},[345,2642,409],{"class":408},[345,2644,1937],{"class":371},[345,2646,2627],{"class":1800},[345,2648,457],{"class":391},[345,2650,620],{"class":384},[345,2652,2450],{"class":371},[345,2654,2656,2658,2660,2662],{"class":347,"line":2655},21,[345,2657,2584],{"class":371},[345,2659,2627],{"class":1800},[345,2661,457],{"class":391},[345,2663,2664],{"class":1800},"schema\n",[345,2666,2668,2671,2673,2675,2677,2679,2681],{"class":347,"line":2667},22,[345,2669,2670],{"class":391},"                ->",[345,2672,635],{"class":384},[345,2674,463],{"class":371},[345,2676,426],{"class":418},[345,2678,712],{"class":422},[345,2680,426],{"class":418},[345,2682,2188],{"class":371},[345,2684,2686,2688,2691,2693,2695,2698,2700],{"class":347,"line":2685},23,[345,2687,2670],{"class":391},[345,2689,2690],{"class":384},"pattern",[345,2692,463],{"class":371},[345,2694,426],{"class":418},[345,2696,2697],{"class":422},"^[0-9-]{10,17}$",[345,2699,426],{"class":418},[345,2701,2702],{"class":371},"),\n",[345,2704,2706],{"class":347,"line":2705},24,[345,2707,2708],{"class":371},"        );\n",[345,2710,2712],{"class":347,"line":2711},25,[345,2713,546],{"class":371},[345,2715,2717],{"class":347,"line":2716},26,[345,2718,552],{"class":371},[333,2720,2721],{"v-slot:output":335},[337,2722,2724],{"className":557,"code":2723,"language":559,"meta":335,"style":335},"{ \"type\": \"string\", \"pattern\": \"^[0-9-]{10,17}$\" }\n",[311,2725,2726],{"__ignoreMap":335},[345,2727,2728,2731,2733,2735,2737,2739,2741,2743,2745,2747,2749,2751,2753,2755,2757,2759,2761],{"class":347,"line":348},[345,2729,2730],{"class":371},"{",[345,2732,642],{"class":570},[345,2734,635],{"class":574},[345,2736,577],{"class":570},[345,2738,392],{"class":371},[345,2740,642],{"class":418},[345,2742,712],{"class":422},[345,2744,577],{"class":418},[345,2746,442],{"class":371},[345,2748,642],{"class":570},[345,2750,2690],{"class":574},[345,2752,577],{"class":570},[345,2754,392],{"class":371},[345,2756,642],{"class":418},[345,2758,2697],{"class":422},[345,2760,577],{"class":418},[345,2762,898],{"class":371},[302,2764,2765,2766,2769,2770,1016],{},"For a rule registered by name (",[311,2767,2768],{},"Validator::extend('phone', …)","), write a\n",[1051,2771,2772],{"href":225},"rule mapper",[320,2774,2776],{"id":2775},"a-body-without-form-request","A body without form request",[302,2778,2779,2782],{},[311,2780,2781],{},"#[RequestBody]"," gives the body of an action that has no form request, or describes the body the rules give:",[337,2784,2786],{"className":339,"code":2785,"language":341,"meta":335,"style":335},"use Ark4ne\\OpenApi\\Attributes\\RequestBody;\n\n#[RequestBody(\n    type: 'array{name: string, tags?: list\u003Cstring>}',\n    description: 'The new label',\n)]\npublic function store(Request $request): LabelResource\n\n#[RequestBody(resource: BookResource::class)]\npublic function import(Request $request): BookResource\n\n#[RequestBody(description: 'The avatar and its caption', required: false)]\npublic function avatar(StoreAvatarRequest $request): void\n",[311,2787,2788,2809,2813,2821,2837,2853,2859,2884,2888,2912,2936,2940,2973],{"__ignoreMap":335},[345,2789,2790,2792,2794,2796,2798,2800,2802,2804,2807],{"class":347,"line":348},[345,2791,1746],{"class":395},[345,2793,1750],{"class":1749},[345,2795,1753],{"class":570},[345,2797,1756],{"class":1749},[345,2799,1753],{"class":570},[345,2801,269],{"class":1749},[345,2803,1753],{"class":570},[345,2805,2806],{"class":1749},"RequestBody",[345,2808,1768],{"class":371},[345,2810,2811],{"class":347,"line":368},[345,2812,1795],{"emptyLinePlaceholder":1794},[345,2814,2815,2817,2819],{"class":347,"line":375},[345,2816,1801],{"class":1800},[345,2818,2806],{"class":1749},[345,2820,2450],{"class":371},[345,2822,2823,2826,2828,2830,2833,2835],{"class":347,"line":399},[345,2824,2825],{"class":358},"    type",[345,2827,392],{"class":371},[345,2829,485],{"class":418},[345,2831,2832],{"class":422},"array{name: string, tags?: list\u003Cstring>}",[345,2834,426],{"class":418},[345,2836,493],{"class":371},[345,2838,2839,2842,2844,2846,2849,2851],{"class":347,"line":405},[345,2840,2841],{"class":358},"    description",[345,2843,392],{"class":371},[345,2845,485],{"class":418},[345,2847,2848],{"class":422},"The new label",[345,2850,426],{"class":418},[345,2852,493],{"class":371},[345,2854,2855,2857],{"class":347,"line":415},[345,2856,1829],{"class":371},[345,2858,1599],{"class":1800},[345,2860,2861,2863,2865,2868,2870,2873,2875,2877,2879,2881],{"class":347,"line":473},[345,2862,1092],{"class":351},[345,2864,381],{"class":351},[345,2866,2867],{"class":384}," store",[345,2869,463],{"class":371},[345,2871,2872],{"class":445},"Request",[345,2874,1937],{"class":371},[345,2876,1940],{"class":1800},[345,2878,1829],{"class":371},[345,2880,392],{"class":391},[345,2882,2883],{"class":445}," LabelResource\n",[345,2885,2886],{"class":347,"line":496},[345,2887,1795],{"emptyLinePlaceholder":1794},[345,2889,2890,2892,2894,2896,2899,2901,2904,2906,2908,2910],{"class":347,"line":517},[345,2891,1801],{"class":1800},[345,2893,2806],{"class":1749},[345,2895,463],{"class":371},[345,2897,2898],{"class":358},"resource",[345,2900,392],{"class":371},[345,2902,2903],{"class":445}," BookResource",[345,2905,449],{"class":391},[345,2907,1165],{"class":395},[345,2909,1829],{"class":371},[345,2911,1599],{"class":1800},[345,2913,2914,2916,2918,2921,2923,2925,2927,2929,2931,2933],{"class":347,"line":29},[345,2915,1092],{"class":351},[345,2917,381],{"class":351},[345,2919,2920],{"class":384}," import",[345,2922,463],{"class":371},[345,2924,2872],{"class":445},[345,2926,1937],{"class":371},[345,2928,1940],{"class":1800},[345,2930,1829],{"class":371},[345,2932,392],{"class":391},[345,2934,2935],{"class":445}," BookResource\n",[345,2937,2938],{"class":347,"line":543},[345,2939,1795],{"emptyLinePlaceholder":1794},[345,2941,2942,2944,2946,2948,2950,2952,2954,2957,2959,2961,2964,2966,2969,2971],{"class":347,"line":549},[345,2943,1801],{"class":1800},[345,2945,2806],{"class":1749},[345,2947,463],{"class":371},[345,2949,739],{"class":358},[345,2951,392],{"class":371},[345,2953,485],{"class":418},[345,2955,2956],{"class":422},"The avatar and its caption",[345,2958,426],{"class":418},[345,2960,442],{"class":371},[345,2962,2963],{"class":358}," required",[345,2965,392],{"class":371},[345,2967,2968],{"class":570}," false",[345,2970,1829],{"class":371},[345,2972,1599],{"class":1800},[345,2974,2975,2977,2979,2982,2984,2987,2989,2991,2993,2995],{"class":347,"line":901},[345,2976,1092],{"class":351},[345,2978,381],{"class":351},[345,2980,2981],{"class":384}," avatar",[345,2983,463],{"class":371},[345,2985,2986],{"class":445},"StoreAvatarRequest",[345,2988,1937],{"class":371},[345,2990,1940],{"class":1800},[345,2992,1829],{"class":371},[345,2994,392],{"class":391},[345,2996,2997],{"class":395}," void\n",[978,2999,3000,3015,3026],{},[981,3001,3002,3003,3005,3006,3008,3009,2506,3012,3014],{},"With ",[311,3004,635],{}," or ",[311,3007,2898],{},", the attribute gives the body of its ",[311,3010,3011],{},"mediaType",[311,3013,1009],{}," by default), next to\nthe media types the rules gave.",[981,3016,3017,3018,995,3020,3022,3023,3025],{},"Without either, it only describes the body the rules gave: ",[311,3019,739],{},[311,3021,437],{},"; ",[311,3024,3011],{}," is then unused.",[981,3027,3028,3030,3031,3033],{},[311,3029,437],{}," is ",[311,3032,788],{}," by default: required when the attribute gives the body, unchanged otherwise.",[3035,3036,3037],"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 .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}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 .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 .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 .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--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 .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sseR_, html code.shiki .sseR_{--shiki-light:#9C3EDA;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .swQdS, html code.shiki .swQdS{--shiki-light:#E53935;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sAQsV, html code.shiki .sAQsV{--shiki-light:#916B53;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--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 .s-KJb, html code.shiki .s-KJb{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .sQRbd, html code.shiki .sQRbd{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":335,"searchDepth":375,"depth":375,"links":3039},[3040,3041,3042,3043,3044,3045],{"id":322,"depth":368,"text":323},{"id":1072,"depth":368,"text":1073},{"id":1723,"depth":368,"text":1724},{"id":1974,"depth":368,"text":1975},{"id":2345,"depth":368,"text":2346},{"id":2775,"depth":368,"text":2776},"Document query parameters, request bodies, headers and cookies from form requests and attributes.","md",{},"---\ntitle: Requests\ndescription: Document query parameters, request bodies, headers and cookies from form requests and attributes.\n---\n\nThe parameters and the body of an operation come from the **form request** of its action: its `rules()` are read and\nturned into schemas. Attributes and `DescribesRequest` add what the rules do not say: headers, cookies, other media\ntypes.\n\n## Form requests\n\nType the form request in the action; its rules give the fields:\n\n::example{input=\"app\u002FHttp\u002FRequests\u002FStoreAvatarRequest.php\" output=\"requestBody\"}\n#input\n```php\nfinal class StoreAvatarRequest extends FormRequest\n{\n    public function rules(): array\n    {\n        return [\n            'avatar' => ['required', File::image()->max(2048)],\n            'caption' => 'nullable|string|max:120',\n            'publish_at' => 'sometimes|date_format:Y-m-d',\n            'company' => 'required_if:type,business|string',\n        ];\n    }\n}\n```\n#output\n```json\n{\n  \"required\": true,\n  \"content\": {\n    \"multipart\u002Fform-data\": {\n      \"schema\": {\n        \"type\": \"object\",\n        \"required\": [\"avatar\"],\n        \"properties\": {\n          \"avatar\": { \"type\": \"string\", \"format\": \"binary\", \"description\": \"At most 2048 KB.\" },\n          \"caption\": { \"type\": [\"string\", \"null\"], \"maxLength\": 120 },\n          \"publish_at\": { \"type\": \"string\", \"format\": \"date\" },\n          \"company\": { \"type\": \"string\", \"description\": \"Required if type is business.\" }\n        }\n      },\n      \"encoding\": {\n        \"avatar\": { \"contentType\": \"image\u002Fjpeg, image\u002Fpng, image\u002Fbmp, image\u002Fgif, image\u002Fwebp\" }\n      }\n    }\n  }\n}\n```\n::\n\n- The fields go to the **query** for `GET`, `HEAD` and `DELETE`, to the **body** otherwise.\n- The body is `application\u002Fjson`, or `multipart\u002Fform-data` as soon as a field is a file; the types of the files give\n  the `encoding`.\n- `required` makes the field required; `sometimes` cancels it; `required_if`, `required_with` and the other\n  conditions leave it optional and write the condition in its description.\n- Nested fields (`address.city`, `tags.*`) give nested objects and lists.\n- A request that redefines `authorize()` adds a 403; a request with rules adds a 422. See\n  [Security & errors](\u002Flaravel-openapi-generator\u002Fdocumenting-endpoints\u002Fsecurity-and-errors).\n\nEvery supported rule and the schema it gives are listed in the\n[validation rules reference](\u002Flaravel-openapi-generator\u002Freference\u002Fvalidation-rules). An unknown rule keeps the field\nand is reported as an info; a closure rule is ignored with an info.\n\n::warning\nOnly form requests are read. Rules validated in the controller (`$request->validate([...])`) are invisible to the\ngenerator: move them to a form request.\n::\n\n## Query parameters\n\nIn the query, every key is its own parameter. A nested key is written with brackets:\n\n::example{input=\"app\u002FHttp\u002FRequests\u002FListPostsRequest.php\" output=\"parameters\"}\n#input\n```php\npublic function rules(): array\n{\n    return [\n        'q' => 'required|string|min:2',\n        'filter.status' => [Rule::enum(Status::class)],\n        'filter.author' => 'integer',\n        'sort' => 'in:title,-title,date,-date',\n    ];\n}\n```\n#output\n```json\n[\n  { \"name\": \"q\", \"in\": \"query\", \"required\": true, \"schema\": { \"type\": \"string\", \"minLength\": 2 } },\n  { \"name\": \"filter[status]\", \"in\": \"query\", \"schema\": { \"type\": \"string\", \"enum\": [\"draft\", \"published\"] } },\n  { \"name\": \"filter[author]\", \"in\": \"query\", \"schema\": { \"type\": \"integer\" } },\n  { \"name\": \"sort\", \"in\": \"query\", \"schema\": { \"type\": \"string\", \"enum\": [\"title\", \"-title\", \"date\", \"-date\"] } }\n]\n```\n::\n\n`strategies.query.by` chooses how nested fields are written:\n\n| `by` | `filter.status`, `filter.author`, `ids.*` |\n| --- | --- |\n| `all` (default) | `filter[status]`, `filter[author]`, `ids[]`: one parameter per key, an object field included |\n| `last` | `filter[status]`, `filter[author]`, `ids`: the same, the last list kept as one array parameter |\n| `none` | `filter` as one `deepObject` parameter, `ids` as an array |\n| `querystring` | the whole query as one `querystring` parameter (3.2; `none` before) |\n\nAn object whose keys are not all known (open `additionalProperties`, a reference) stays a `deepObject` with `all` and\n`last`, with an info.\n\n## Headers, cookies and parameters by attribute\n\n`#[QueryParameter]`, `#[Header]` and `#[Cookie]` add a parameter, or complete the parameter of the same name the rules\ngave. Put them on the controller, the request class or the action:\n\n```php\nuse Ark4ne\\OpenApi\\Attributes\\Header;\nuse Ark4ne\\OpenApi\\Attributes\\QueryParameter;\n\n#[QueryParameter('page', description: 'Page number, from 1')]\n#[QueryParameter('sort', type: \"'title'|'price'\", description: 'Sort order')]\n#[Header('X-Request-Id', type: 'string', description: 'Echoed in the response')]\npublic function index(ListPostsRequest $request): array\n```\n\nA parameter left `null` keeps its value: `#[QueryParameter('page', description: '…')]` keeps the schema\n(`integer`, `minimum: 1`) and the requirement of the `page` rule. `type` is a PHPDoc type\n([PHPDoc types](\u002Flaravel-openapi-generator\u002Freference\u002Fphpdoc-types)). A header is matched whatever the case of its name.\n\n## Describing a request by hand\n\nA form request implementing `DescribesRequest` completes or replaces what its rules describe:\n\n```php [app\u002FHttp\u002FRequests\u002FListPostsRequest.php]\nuse Ark4ne\\OpenApi\\Extraction\\Requests\\DescribesRequest;\nuse Ark4ne\\OpenApi\\Extraction\\Requests\\RequestDescriber;\n\nfinal class ListPostsRequest extends FormRequest implements DescribesRequest\n{\n    public function rules(): array\n    {\n        return ['q' => 'required|string|min:2'];\n    }\n\n    public function describe(RequestDescriber $request): RequestDescriber\n    {\n        return $request\n            ->header('X-Tenant', 'required|uuid', 'Tenant of the request')\n            ->query(['include' => 'string']);\n    }\n}\n```\n\n`RequestDescriber` is immutable: chain the calls and return the result. Rules are written as in `rules()`; a writer\n`Schema` is used as it is.\n\n| Method | Adds |\n| --- | --- |\n| `header($name, $rules, $description, $required)` | a header |\n| `cookie($name, $rules, $description, $required)` | a cookie |\n| `query(array $rules)` | query fields |\n| `json(array $rules)`, `form(array $rules)`, `multipart(array $rules)` | body fields of `application\u002Fjson`, `application\u002Fx-www-form-urlencoded`, `multipart\u002Fform-data` |\n| `body(array $rules, ?string $mediaType)` | body fields of any media type |\n| `bodySchema(Schema $schema, string $mediaType)` | a body described by a schema, replacing that media type |\n| `bodyDescription(?string $description)` | the description of the body |\n| `parameter(ParameterDescription $parameter)` | any parameter, replacing the one of the same name and location |\n\n## A rule that describes itself\n\nA validation rule of your application implements `DescribesRule` to give its schema:\n\n::example{input=\"app\u002FRules\u002FIsbn.php\" output=\"schema of the field\"}\n#input\n```php\nuse Ark4ne\\OpenApi\\Description\\FieldDescription;\nuse Ark4ne\\OpenApi\\Extraction\\Rules\\DescribesRule;\n\nfinal class Isbn implements DescribesRule, ValidationRule\n{\n    public function validate(\n        string $attribute,\n        mixed $value,\n        Closure $fail,\n    ): void {\n        if (! is_string($value)\n            || preg_match('\u002F^[0-9-]{10,17}$\u002F', $value) !== 1\n        ) {\n            $fail('The :attribute must be an ISBN.');\n        }\n    }\n\n    public function describe(FieldDescription $field): FieldDescription\n    {\n        return $field->schema(\n            $field->schema\n                ->type('string')\n                ->pattern('^[0-9-]{10,17}$'),\n        );\n    }\n}\n```\n#output\n```json\n{ \"type\": \"string\", \"pattern\": \"^[0-9-]{10,17}$\" }\n```\n::\n\nFor a rule registered by name (`Validator::extend('phone', …)`), write a\n[rule mapper](\u002Flaravel-openapi-generator\u002Fextending\u002Frule-mappers).\n\n## A body without form request\n\n`#[RequestBody]` gives the body of an action that has no form request, or describes the body the rules give:\n\n```php\nuse Ark4ne\\OpenApi\\Attributes\\RequestBody;\n\n#[RequestBody(\n    type: 'array{name: string, tags?: list\u003Cstring>}',\n    description: 'The new label',\n)]\npublic function store(Request $request): LabelResource\n\n#[RequestBody(resource: BookResource::class)]\npublic function import(Request $request): BookResource\n\n#[RequestBody(description: 'The avatar and its caption', required: false)]\npublic function avatar(StoreAvatarRequest $request): void\n```\n\n- With `type` or `resource`, the attribute gives the body of its `mediaType` (`application\u002Fjson` by default), next to\n  the media types the rules gave.\n- Without either, it only describes the body the rules gave: `description` and `required`; `mediaType` is then unused.\n- `required` is `null` by default: required when the attribute gives the body, unchanged otherwise.\n",{"title":150,"description":3046},"j2N5ezW1-enrkF2KvZevjxdVjIuneUVh64sPvM2f8HE",[3053,3055],{"title":146,"path":147,"stem":148,"description":3054,"children":-1},"Choose the routes of a document, and give each operation its summary, description, tags and identifier.",{"title":154,"path":155,"stem":156,"description":3056,"children":-1},"Document the responses of an action from its return type, and declare what the return type cannot tell.",1795438899509]