[{"data":1,"prerenderedAt":1904},["ShallowReactive",2],{"libs":3,"navigation-laravel-openapi-generator":115,"\u002Flaravel-openapi-generator\u002Fintegrations\u002Fjson-api":296,"\u002Flaravel-openapi-generator\u002Fintegrations\u002Fjson-api-surround":1899},[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":250,"body":298,"description":1893,"experimental":119,"extension":1894,"links":118,"meta":1895,"navigation":516,"path":251,"rawbody":1896,"seo":1897,"since":118,"stem":252,"__hash__":1898},"laravel_openapi_generator\u002Flaravel-openapi-generator\u002F6.integrations\u002F1.json-api.md",{"type":299,"value":300,"toc":1887},"minimark",[301,322,325,330,1211,1261,1265,1281,1698,1709,1713,1720,1770,1776,1780,1880,1883],[302,303,304,305,308,309,313,314,317,318,321],"p",{},"With ",[306,307,28],"a",{"href":43}," installed, its resources are documented as JSON:API resource objects in\n",[310,311,312],"code",{},"application\u002Fvnd.api+json",", with their attributes, relationships, links, meta and ",[310,315,316],{},"included"," resources. Nothing to\nconfigure: the installed version is detected, and ",[310,319,320],{},"php artisan about"," shows it.",[323,324],"lib-card",{"slug":37},[326,327,329],"h2",{"id":328},"what-is-documented","What is documented",[331,332,335,597],"example",{"input":333,"output":334},"app\u002FHttp\u002FResources\u002FArticleResource.php","components.schemas.Article",[336,337,339],"template",{"v-slot:input":338},"",[340,341,345],"pre",{"className":342,"code":343,"language":344,"meta":338,"style":338},"language-php shiki shiki-themes material-theme-lighter github-light github-dark","\u002F**\n * @extends JsonApiResource\u003CArticle>\n *\u002F\nfinal class ArticleResource extends JsonApiResource\n{\n    public function toAttributes(Request $request): iterable\n    {\n        return [\n            'title' => $this->string(),\n            'published_at' => $this->date(),\n        ];\n    }\n\n    protected function toRelationships(Request $request): iterable\n    {\n        return ['author' => $this->one(AuthorResource::class)];\n    }\n}\n","php",[310,346,347,356,362,368,388,395,433,439,449,479,499,505,511,518,543,548,586,591],{"__ignoreMap":338},[348,349,352],"span",{"class":350,"line":351},"line",1,[348,353,355],{"class":354},"sutJx","\u002F**\n",[348,357,359],{"class":350,"line":358},2,[348,360,361],{"class":354}," * @extends JsonApiResource\u003CArticle>\n",[348,363,365],{"class":350,"line":364},3,[348,366,367],{"class":354}," *\u002F\n",[348,369,371,375,378,382,385],{"class":350,"line":370},4,[348,372,374],{"class":373},"sbsja","final",[348,376,377],{"class":373}," class",[348,379,381],{"class":380},"sbgvK"," ArticleResource",[348,383,384],{"class":373}," extends",[348,386,387],{"class":380}," JsonApiResource\n",[348,389,391],{"class":350,"line":390},5,[348,392,394],{"class":393},"sP7_E","{\n",[348,396,398,401,404,408,411,415,418,422,425,429],{"class":350,"line":397},6,[348,399,400],{"class":373},"    public",[348,402,403],{"class":373}," function",[348,405,407],{"class":406},"sGLFI"," toAttributes",[348,409,410],{"class":393},"(",[348,412,414],{"class":413},"sZMiF","Request",[348,416,417],{"class":393}," $",[348,419,421],{"class":420},"su5hD","request",[348,423,424],{"class":393},")",[348,426,428],{"class":427},"smGrS",":",[348,430,432],{"class":431},"sw1J6"," iterable\n",[348,434,436],{"class":350,"line":435},7,[348,437,438],{"class":393},"    {\n",[348,440,442,446],{"class":350,"line":441},8,[348,443,445],{"class":444},"sVHd0","        return",[348,447,448],{"class":393}," [\n",[348,450,452,456,460,463,466,470,473,476],{"class":350,"line":451},9,[348,453,455],{"class":454},"sjJ54","            '",[348,457,459],{"class":458},"s_sjI","title",[348,461,462],{"class":454},"'",[348,464,465],{"class":427}," =>",[348,467,469],{"class":468},"s39Yj"," $this",[348,471,472],{"class":427},"->",[348,474,475],{"class":406},"string",[348,477,478],{"class":393},"(),\n",[348,480,481,483,486,488,490,492,494,497],{"class":350,"line":29},[348,482,455],{"class":454},[348,484,485],{"class":458},"published_at",[348,487,462],{"class":454},[348,489,465],{"class":427},[348,491,469],{"class":468},[348,493,472],{"class":427},[348,495,496],{"class":406},"date",[348,498,478],{"class":393},[348,500,502],{"class":350,"line":501},11,[348,503,504],{"class":393},"        ];\n",[348,506,508],{"class":350,"line":507},12,[348,509,510],{"class":393},"    }\n",[348,512,514],{"class":350,"line":513},13,[348,515,517],{"emptyLinePlaceholder":516},true,"\n",[348,519,521,524,526,529,531,533,535,537,539,541],{"class":350,"line":520},14,[348,522,523],{"class":373},"    protected",[348,525,403],{"class":373},[348,527,528],{"class":406}," toRelationships",[348,530,410],{"class":393},[348,532,414],{"class":413},[348,534,417],{"class":393},[348,536,421],{"class":420},[348,538,424],{"class":393},[348,540,428],{"class":427},[348,542,432],{"class":431},[348,544,546],{"class":350,"line":545},15,[348,547,438],{"class":393},[348,549,551,553,556,558,561,563,565,567,569,572,574,577,580,583],{"class":350,"line":550},16,[348,552,445],{"class":444},[348,554,555],{"class":393}," [",[348,557,462],{"class":454},[348,559,560],{"class":458},"author",[348,562,462],{"class":454},[348,564,465],{"class":427},[348,566,469],{"class":468},[348,568,472],{"class":427},[348,570,571],{"class":406},"one",[348,573,410],{"class":393},[348,575,576],{"class":413},"AuthorResource",[348,578,579],{"class":427},"::",[348,581,582],{"class":431},"class",[348,584,585],{"class":393},")];\n",[348,587,589],{"class":350,"line":588},17,[348,590,510],{"class":393},[348,592,594],{"class":350,"line":593},18,[348,595,596],{"class":393},"}\n",[336,598,599],{"v-slot:output":338},[340,600,604],{"className":601,"code":602,"language":603,"meta":338,"style":338},"language-json shiki shiki-themes material-theme-lighter github-light github-dark","{\n  \"type\": \"object\",\n  \"required\": [\"id\", \"type\"],\n  \"properties\": {\n    \"id\": { \"type\": \"string\" },\n    \"type\": { \"type\": \"string\", \"const\": \"article\" },\n    \"attributes\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"title\": { \"type\": [\"string\", \"null\"] },\n        \"published_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n      }\n    },\n    \"relationships\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"author\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"data\": {\n              \"type\": [\"object\", \"null\"],\n              \"required\": [\"type\", \"id\"],\n              \"properties\": {\n                \"type\": { \"type\": \"string\", \"const\": \"author\" },\n                \"id\": { \"type\": \"string\" }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n","json",[310,605,606,610,635,667,681,713,759,772,791,803,848,906,911,916,929,947,959,971,990,1003,1018,1049,1078,1091,1138,1167,1173,1179,1185,1191,1195,1200,1206],{"__ignoreMap":338},[348,607,608],{"class":350,"line":351},[348,609,394],{"class":393},[348,611,612,615,619,622,624,627,630,632],{"class":350,"line":358},[348,613,614],{"class":468},"  \"",[348,616,618],{"class":617},"sseR_","type",[348,620,621],{"class":468},"\"",[348,623,428],{"class":393},[348,625,626],{"class":454}," \"",[348,628,629],{"class":458},"object",[348,631,621],{"class":454},[348,633,634],{"class":393},",\n",[348,636,637,639,642,644,646,648,650,653,655,658,660,662,664],{"class":350,"line":364},[348,638,614],{"class":468},[348,640,641],{"class":617},"required",[348,643,621],{"class":468},[348,645,428],{"class":393},[348,647,555],{"class":393},[348,649,621],{"class":454},[348,651,652],{"class":458},"id",[348,654,621],{"class":454},[348,656,657],{"class":393},",",[348,659,626],{"class":454},[348,661,618],{"class":458},[348,663,621],{"class":454},[348,665,666],{"class":393},"],\n",[348,668,669,671,674,676,678],{"class":350,"line":370},[348,670,614],{"class":468},[348,672,673],{"class":617},"properties",[348,675,621],{"class":468},[348,677,428],{"class":393},[348,679,680],{"class":393}," {\n",[348,682,683,686,688,690,692,695,697,700,702,704,706,708,710],{"class":350,"line":390},[348,684,685],{"class":468},"    \"",[348,687,652],{"class":413},[348,689,621],{"class":468},[348,691,428],{"class":393},[348,693,694],{"class":393}," {",[348,696,626],{"class":468},[348,698,618],{"class":699},"srdBf",[348,701,621],{"class":468},[348,703,428],{"class":393},[348,705,626],{"class":454},[348,707,475],{"class":458},[348,709,621],{"class":454},[348,711,712],{"class":393}," },\n",[348,714,715,717,719,721,723,725,727,729,731,733,735,737,739,741,743,746,748,750,752,755,757],{"class":350,"line":397},[348,716,685],{"class":468},[348,718,618],{"class":413},[348,720,621],{"class":468},[348,722,428],{"class":393},[348,724,694],{"class":393},[348,726,626],{"class":468},[348,728,618],{"class":699},[348,730,621],{"class":468},[348,732,428],{"class":393},[348,734,626],{"class":454},[348,736,475],{"class":458},[348,738,621],{"class":454},[348,740,657],{"class":393},[348,742,626],{"class":468},[348,744,745],{"class":699},"const",[348,747,621],{"class":468},[348,749,428],{"class":393},[348,751,626],{"class":454},[348,753,754],{"class":458},"article",[348,756,621],{"class":454},[348,758,712],{"class":393},[348,760,761,763,766,768,770],{"class":350,"line":435},[348,762,685],{"class":468},[348,764,765],{"class":413},"attributes",[348,767,621],{"class":468},[348,769,428],{"class":393},[348,771,680],{"class":393},[348,773,774,777,779,781,783,785,787,789],{"class":350,"line":441},[348,775,776],{"class":468},"      \"",[348,778,618],{"class":699},[348,780,621],{"class":468},[348,782,428],{"class":393},[348,784,626],{"class":454},[348,786,629],{"class":458},[348,788,621],{"class":454},[348,790,634],{"class":393},[348,792,793,795,797,799,801],{"class":350,"line":451},[348,794,776],{"class":468},[348,796,673],{"class":699},[348,798,621],{"class":468},[348,800,428],{"class":393},[348,802,680],{"class":393},[348,804,805,808,811,813,815,817,819,822,824,826,828,830,832,834,836,838,841,843,846],{"class":350,"line":29},[348,806,807],{"class":468},"        \"",[348,809,459],{"class":810},"swQdS",[348,812,621],{"class":468},[348,814,428],{"class":393},[348,816,694],{"class":393},[348,818,626],{"class":468},[348,820,618],{"class":821},"sAQsV",[348,823,621],{"class":468},[348,825,428],{"class":393},[348,827,555],{"class":393},[348,829,621],{"class":454},[348,831,475],{"class":458},[348,833,621],{"class":454},[348,835,657],{"class":393},[348,837,626],{"class":454},[348,839,840],{"class":458},"null",[348,842,621],{"class":454},[348,844,845],{"class":393},"]",[348,847,712],{"class":393},[348,849,850,852,854,856,858,860,862,864,866,868,870,872,874,876,878,880,882,884,887,889,892,894,896,898,901,903],{"class":350,"line":501},[348,851,807],{"class":468},[348,853,485],{"class":810},[348,855,621],{"class":468},[348,857,428],{"class":393},[348,859,694],{"class":393},[348,861,626],{"class":468},[348,863,618],{"class":821},[348,865,621],{"class":468},[348,867,428],{"class":393},[348,869,555],{"class":393},[348,871,621],{"class":454},[348,873,475],{"class":458},[348,875,621],{"class":454},[348,877,657],{"class":393},[348,879,626],{"class":454},[348,881,840],{"class":458},[348,883,621],{"class":454},[348,885,886],{"class":393},"],",[348,888,626],{"class":468},[348,890,891],{"class":821},"format",[348,893,621],{"class":468},[348,895,428],{"class":393},[348,897,626],{"class":454},[348,899,900],{"class":458},"date-time",[348,902,621],{"class":454},[348,904,905],{"class":393}," }\n",[348,907,908],{"class":350,"line":507},[348,909,910],{"class":393},"      }\n",[348,912,913],{"class":350,"line":513},[348,914,915],{"class":393},"    },\n",[348,917,918,920,923,925,927],{"class":350,"line":520},[348,919,685],{"class":468},[348,921,922],{"class":413},"relationships",[348,924,621],{"class":468},[348,926,428],{"class":393},[348,928,680],{"class":393},[348,930,931,933,935,937,939,941,943,945],{"class":350,"line":545},[348,932,776],{"class":468},[348,934,618],{"class":699},[348,936,621],{"class":468},[348,938,428],{"class":393},[348,940,626],{"class":454},[348,942,629],{"class":458},[348,944,621],{"class":454},[348,946,634],{"class":393},[348,948,949,951,953,955,957],{"class":350,"line":550},[348,950,776],{"class":468},[348,952,673],{"class":699},[348,954,621],{"class":468},[348,956,428],{"class":393},[348,958,680],{"class":393},[348,960,961,963,965,967,969],{"class":350,"line":588},[348,962,807],{"class":468},[348,964,560],{"class":810},[348,966,621],{"class":468},[348,968,428],{"class":393},[348,970,680],{"class":393},[348,972,973,976,978,980,982,984,986,988],{"class":350,"line":593},[348,974,975],{"class":468},"          \"",[348,977,618],{"class":821},[348,979,621],{"class":468},[348,981,428],{"class":393},[348,983,626],{"class":454},[348,985,629],{"class":458},[348,987,621],{"class":454},[348,989,634],{"class":393},[348,991,993,995,997,999,1001],{"class":350,"line":992},19,[348,994,975],{"class":468},[348,996,673],{"class":821},[348,998,621],{"class":468},[348,1000,428],{"class":393},[348,1002,680],{"class":393},[348,1004,1005,1008,1012,1014,1016],{"class":350,"line":58},[348,1006,1007],{"class":468},"            \"",[348,1009,1011],{"class":1010},"sptTA","data",[348,1013,621],{"class":468},[348,1015,428],{"class":393},[348,1017,680],{"class":393},[348,1019,1021,1024,1027,1029,1031,1033,1035,1037,1039,1041,1043,1045,1047],{"class":350,"line":1020},21,[348,1022,1023],{"class":468},"              \"",[348,1025,618],{"class":1026},"syTEX",[348,1028,621],{"class":468},[348,1030,428],{"class":393},[348,1032,555],{"class":393},[348,1034,621],{"class":454},[348,1036,629],{"class":458},[348,1038,621],{"class":454},[348,1040,657],{"class":393},[348,1042,626],{"class":454},[348,1044,840],{"class":458},[348,1046,621],{"class":454},[348,1048,666],{"class":393},[348,1050,1052,1054,1056,1058,1060,1062,1064,1066,1068,1070,1072,1074,1076],{"class":350,"line":1051},22,[348,1053,1023],{"class":468},[348,1055,641],{"class":1026},[348,1057,621],{"class":468},[348,1059,428],{"class":393},[348,1061,555],{"class":393},[348,1063,621],{"class":454},[348,1065,618],{"class":458},[348,1067,621],{"class":454},[348,1069,657],{"class":393},[348,1071,626],{"class":454},[348,1073,652],{"class":458},[348,1075,621],{"class":454},[348,1077,666],{"class":393},[348,1079,1081,1083,1085,1087,1089],{"class":350,"line":1080},23,[348,1082,1023],{"class":468},[348,1084,673],{"class":1026},[348,1086,621],{"class":468},[348,1088,428],{"class":393},[348,1090,680],{"class":393},[348,1092,1094,1097,1099,1101,1103,1105,1107,1110,1112,1114,1116,1118,1120,1122,1124,1126,1128,1130,1132,1134,1136],{"class":350,"line":1093},24,[348,1095,1096],{"class":468},"                \"",[348,1098,618],{"class":617},[348,1100,621],{"class":468},[348,1102,428],{"class":393},[348,1104,694],{"class":393},[348,1106,626],{"class":468},[348,1108,618],{"class":1109},"stzsN",[348,1111,621],{"class":468},[348,1113,428],{"class":393},[348,1115,626],{"class":454},[348,1117,475],{"class":458},[348,1119,621],{"class":454},[348,1121,657],{"class":393},[348,1123,626],{"class":468},[348,1125,745],{"class":1109},[348,1127,621],{"class":468},[348,1129,428],{"class":393},[348,1131,626],{"class":454},[348,1133,560],{"class":458},[348,1135,621],{"class":454},[348,1137,712],{"class":393},[348,1139,1141,1143,1145,1147,1149,1151,1153,1155,1157,1159,1161,1163,1165],{"class":350,"line":1140},25,[348,1142,1096],{"class":468},[348,1144,652],{"class":617},[348,1146,621],{"class":468},[348,1148,428],{"class":393},[348,1150,694],{"class":393},[348,1152,626],{"class":468},[348,1154,618],{"class":1109},[348,1156,621],{"class":468},[348,1158,428],{"class":393},[348,1160,626],{"class":454},[348,1162,475],{"class":458},[348,1164,621],{"class":454},[348,1166,905],{"class":393},[348,1168,1170],{"class":350,"line":1169},26,[348,1171,1172],{"class":393},"              }\n",[348,1174,1176],{"class":350,"line":1175},27,[348,1177,1178],{"class":393},"            }\n",[348,1180,1182],{"class":350,"line":1181},28,[348,1183,1184],{"class":393},"          }\n",[348,1186,1188],{"class":350,"line":1187},29,[348,1189,1190],{"class":393},"        }\n",[348,1192,1193],{"class":350,"line":84},[348,1194,910],{"class":393},[348,1196,1198],{"class":350,"line":1197},31,[348,1199,510],{"class":393},[348,1201,1203],{"class":350,"line":1202},32,[348,1204,1205],{"class":393},"  }\n",[348,1207,1209],{"class":350,"line":1208},33,[348,1210,596],{"class":393},[1212,1213,1214,1234,1242],"ul",{},[1215,1216,1217,1218,1222,1223,1226,1227,1226,1230,1233],"li",{},"The ",[1219,1220,1221],"strong",{},"descriptors"," give the type of each value: ",[310,1224,1225],{},"$this->string()",", ",[310,1228,1229],{},"$this->date()",[310,1231,1232],{},"$this->struct()","…",[1215,1235,1217,1236,1238,1239,1241],{},[1219,1237,922],{}," give the resource identifiers, and the resources a response may include (",[310,1240,316],{},").",[1215,1243,1244,1245,1248,1249,1252,1253,1256,1257,1260],{},"A resource returned by an action is wrapped in a document: ",[310,1246,1247],{},"{\"data\": Article, \"included\": [Author]}","; a collection\ngives ",[310,1250,1251],{},"{\"data\": [Article]}",", with ",[310,1254,1255],{},"links"," and ",[310,1258,1259],{},"meta"," when paginated.",[326,1262,1264],{"id":1263},"include-and-sparse-fieldsets","Include and sparse fieldsets",[302,1266,1217,1267,1256,1270,1273,1274,1256,1277,1280],{},[310,1268,1269],{},"Includes",[310,1271,1272],{},"Fields"," rules of a form request give the ",[310,1275,1276],{},"include",[310,1278,1279],{},"fields[type]"," query parameters, with the\nrelationships and the fields they accept:",[331,1282,1285,1389],{"input":1283,"output":1284},"app\u002FHttp\u002FRequests\u002FShowArticleRequest.php","parameters",[336,1286,1287],{"v-slot:input":338},[340,1288,1290],{"className":342,"code":1289,"language":344,"meta":338,"style":338},"public function rules(): array\n{\n    return [\n        'include' => [new Includes(ArticleResource::class)],\n        'fields' => [new Fields(ArticleResource::class)],\n    ];\n}\n",[310,1291,1292,1310,1314,1321,1352,1380,1385],{"__ignoreMap":338},[348,1293,1294,1297,1299,1302,1305,1307],{"class":350,"line":351},[348,1295,1296],{"class":373},"public",[348,1298,403],{"class":373},[348,1300,1301],{"class":406}," rules",[348,1303,1304],{"class":393},"()",[348,1306,428],{"class":427},[348,1308,1309],{"class":431}," array\n",[348,1311,1312],{"class":350,"line":358},[348,1313,394],{"class":393},[348,1315,1316,1319],{"class":350,"line":364},[348,1317,1318],{"class":444},"    return",[348,1320,448],{"class":393},[348,1322,1323,1326,1328,1330,1332,1334,1337,1340,1342,1345,1347,1349],{"class":350,"line":370},[348,1324,1325],{"class":454},"        '",[348,1327,1276],{"class":458},[348,1329,462],{"class":454},[348,1331,465],{"class":427},[348,1333,555],{"class":393},[348,1335,1336],{"class":431},"new",[348,1338,1339],{"class":413}," Includes",[348,1341,410],{"class":393},[348,1343,1344],{"class":413},"ArticleResource",[348,1346,579],{"class":427},[348,1348,582],{"class":431},[348,1350,1351],{"class":393},")],\n",[348,1353,1354,1356,1359,1361,1363,1365,1367,1370,1372,1374,1376,1378],{"class":350,"line":390},[348,1355,1325],{"class":454},[348,1357,1358],{"class":458},"fields",[348,1360,462],{"class":454},[348,1362,465],{"class":427},[348,1364,555],{"class":393},[348,1366,1336],{"class":431},[348,1368,1369],{"class":413}," Fields",[348,1371,410],{"class":393},[348,1373,1344],{"class":413},[348,1375,579],{"class":427},[348,1377,582],{"class":431},[348,1379,1351],{"class":393},[348,1381,1382],{"class":350,"line":397},[348,1383,1384],{"class":393},"    ];\n",[348,1386,1387],{"class":350,"line":435},[348,1388,596],{"class":393},[336,1390,1391],{"v-slot:output":338},[340,1392,1394],{"className":601,"code":1393,"language":603,"meta":338,"style":338},"[\n  {\n    \"name\": \"include\",\n    \"in\": \"query\",\n    \"schema\": { \"type\": \"string\", \"example\": \"author\", \"description\": \"Relationships to include, separated by commas: `author`.\" }\n  },\n  {\n    \"name\": \"fields[article]\",\n    \"in\": \"query\",\n    \"schema\": { \"type\": \"string\", \"description\": \"Fields of `article`, separated by commas: `title`, `published_at`.\" }\n  },\n  {\n    \"name\": \"fields[author]\",\n    \"in\": \"query\",\n    \"schema\": { \"type\": \"string\", \"description\": \"Fields of `author`, separated by commas: `name`.\" }\n  }\n]\n",[310,1395,1396,1401,1406,1425,1445,1508,1513,1517,1536,1554,1599,1603,1607,1626,1644,1689,1693],{"__ignoreMap":338},[348,1397,1398],{"class":350,"line":351},[348,1399,1400],{"class":393},"[\n",[348,1402,1403],{"class":350,"line":358},[348,1404,1405],{"class":393},"  {\n",[348,1407,1408,1410,1413,1415,1417,1419,1421,1423],{"class":350,"line":364},[348,1409,685],{"class":468},[348,1411,1412],{"class":617},"name",[348,1414,621],{"class":468},[348,1416,428],{"class":393},[348,1418,626],{"class":454},[348,1420,1276],{"class":458},[348,1422,621],{"class":454},[348,1424,634],{"class":393},[348,1426,1427,1429,1432,1434,1436,1438,1441,1443],{"class":350,"line":370},[348,1428,685],{"class":468},[348,1430,1431],{"class":617},"in",[348,1433,621],{"class":468},[348,1435,428],{"class":393},[348,1437,626],{"class":454},[348,1439,1440],{"class":458},"query",[348,1442,621],{"class":454},[348,1444,634],{"class":393},[348,1446,1447,1449,1452,1454,1456,1458,1460,1462,1464,1466,1468,1470,1472,1474,1476,1478,1480,1482,1484,1486,1488,1490,1492,1495,1497,1499,1501,1504,1506],{"class":350,"line":390},[348,1448,685],{"class":468},[348,1450,1451],{"class":617},"schema",[348,1453,621],{"class":468},[348,1455,428],{"class":393},[348,1457,694],{"class":393},[348,1459,626],{"class":468},[348,1461,618],{"class":413},[348,1463,621],{"class":468},[348,1465,428],{"class":393},[348,1467,626],{"class":454},[348,1469,475],{"class":458},[348,1471,621],{"class":454},[348,1473,657],{"class":393},[348,1475,626],{"class":468},[348,1477,331],{"class":413},[348,1479,621],{"class":468},[348,1481,428],{"class":393},[348,1483,626],{"class":454},[348,1485,560],{"class":458},[348,1487,621],{"class":454},[348,1489,657],{"class":393},[348,1491,626],{"class":468},[348,1493,1494],{"class":413},"description",[348,1496,621],{"class":468},[348,1498,428],{"class":393},[348,1500,626],{"class":454},[348,1502,1503],{"class":458},"Relationships to include, separated by commas: `author`.",[348,1505,621],{"class":454},[348,1507,905],{"class":393},[348,1509,1510],{"class":350,"line":397},[348,1511,1512],{"class":393},"  },\n",[348,1514,1515],{"class":350,"line":435},[348,1516,1405],{"class":393},[348,1518,1519,1521,1523,1525,1527,1529,1532,1534],{"class":350,"line":441},[348,1520,685],{"class":468},[348,1522,1412],{"class":617},[348,1524,621],{"class":468},[348,1526,428],{"class":393},[348,1528,626],{"class":454},[348,1530,1531],{"class":458},"fields[article]",[348,1533,621],{"class":454},[348,1535,634],{"class":393},[348,1537,1538,1540,1542,1544,1546,1548,1550,1552],{"class":350,"line":451},[348,1539,685],{"class":468},[348,1541,1431],{"class":617},[348,1543,621],{"class":468},[348,1545,428],{"class":393},[348,1547,626],{"class":454},[348,1549,1440],{"class":458},[348,1551,621],{"class":454},[348,1553,634],{"class":393},[348,1555,1556,1558,1560,1562,1564,1566,1568,1570,1572,1574,1576,1578,1580,1582,1584,1586,1588,1590,1592,1595,1597],{"class":350,"line":29},[348,1557,685],{"class":468},[348,1559,1451],{"class":617},[348,1561,621],{"class":468},[348,1563,428],{"class":393},[348,1565,694],{"class":393},[348,1567,626],{"class":468},[348,1569,618],{"class":413},[348,1571,621],{"class":468},[348,1573,428],{"class":393},[348,1575,626],{"class":454},[348,1577,475],{"class":458},[348,1579,621],{"class":454},[348,1581,657],{"class":393},[348,1583,626],{"class":468},[348,1585,1494],{"class":413},[348,1587,621],{"class":468},[348,1589,428],{"class":393},[348,1591,626],{"class":454},[348,1593,1594],{"class":458},"Fields of `article`, separated by commas: `title`, `published_at`.",[348,1596,621],{"class":454},[348,1598,905],{"class":393},[348,1600,1601],{"class":350,"line":501},[348,1602,1512],{"class":393},[348,1604,1605],{"class":350,"line":507},[348,1606,1405],{"class":393},[348,1608,1609,1611,1613,1615,1617,1619,1622,1624],{"class":350,"line":513},[348,1610,685],{"class":468},[348,1612,1412],{"class":617},[348,1614,621],{"class":468},[348,1616,428],{"class":393},[348,1618,626],{"class":454},[348,1620,1621],{"class":458},"fields[author]",[348,1623,621],{"class":454},[348,1625,634],{"class":393},[348,1627,1628,1630,1632,1634,1636,1638,1640,1642],{"class":350,"line":520},[348,1629,685],{"class":468},[348,1631,1431],{"class":617},[348,1633,621],{"class":468},[348,1635,428],{"class":393},[348,1637,626],{"class":454},[348,1639,1440],{"class":458},[348,1641,621],{"class":454},[348,1643,634],{"class":393},[348,1645,1646,1648,1650,1652,1654,1656,1658,1660,1662,1664,1666,1668,1670,1672,1674,1676,1678,1680,1682,1685,1687],{"class":350,"line":545},[348,1647,685],{"class":468},[348,1649,1451],{"class":617},[348,1651,621],{"class":468},[348,1653,428],{"class":393},[348,1655,694],{"class":393},[348,1657,626],{"class":468},[348,1659,618],{"class":413},[348,1661,621],{"class":468},[348,1663,428],{"class":393},[348,1665,626],{"class":454},[348,1667,475],{"class":458},[348,1669,621],{"class":454},[348,1671,657],{"class":393},[348,1673,626],{"class":468},[348,1675,1494],{"class":413},[348,1677,621],{"class":468},[348,1679,428],{"class":393},[348,1681,626],{"class":454},[348,1683,1684],{"class":458},"Fields of `author`, separated by commas: `name`.",[348,1686,621],{"class":454},[348,1688,905],{"class":393},[348,1690,1691],{"class":350,"line":550},[348,1692,1205],{"class":393},[348,1694,1695],{"class":350,"line":588},[348,1696,1697],{"class":393},"]\n",[302,1699,1700,1701,1704,1705,1708],{},"The rules are ",[310,1702,1703],{},"Ark4ne\\JsonApi\\Requests\\Rules\\…"," in 1.x, ",[310,1706,1707],{},"Ark4ne\\JsonApi\\Http\\Rules\\…"," from 2.x.",[326,1710,1712],{"id":1711},"errors","Errors",[302,1714,1715,1716,1719],{},"If the application renders its errors as JSON:API error documents (",[310,1717,1718],{},"JsonApi::renderErrors()"," from 2.x), say so:",[340,1721,1724],{"className":342,"code":1722,"filename":1723,"language":344,"meta":338,"style":338},"'integrations' => [\n    'json_api' => ['errors' => true],\n],\n","config\u002Fopenapi.php",[310,1725,1726,1739,1766],{"__ignoreMap":338},[348,1727,1728,1730,1733,1735,1737],{"class":350,"line":351},[348,1729,462],{"class":454},[348,1731,1732],{"class":458},"integrations",[348,1734,462],{"class":454},[348,1736,465],{"class":427},[348,1738,448],{"class":393},[348,1740,1741,1744,1747,1749,1751,1753,1755,1757,1759,1761,1764],{"class":350,"line":358},[348,1742,1743],{"class":454},"    '",[348,1745,1746],{"class":458},"json_api",[348,1748,462],{"class":454},[348,1750,465],{"class":427},[348,1752,555],{"class":393},[348,1754,462],{"class":454},[348,1756,1711],{"class":458},[348,1758,462],{"class":454},[348,1760,465],{"class":427},[348,1762,1763],{"class":468}," true",[348,1765,666],{"class":393},[348,1767,1768],{"class":350,"line":364},[348,1769,666],{"class":393},[302,1771,1772,1773,1775],{},"The 401, 403, 404, 422 and other error responses are then JSON:API error documents, in ",[310,1774,312],{},".",[326,1777,1779],{"id":1778},"versions","Versions",[1781,1782,1783,1808,1835],"tabs",{},[1784,1785,1786],"tabs-item",{"label":17},[302,1787,1788,1790,1791,1794,1795,1226,1798,634,1801,1226,1804,1807],{},[310,1789,30],{}," ",[310,1792,1793],{},"^1.9",". The generator runs the hooks of the resources (",[310,1796,1797],{},"toAttributes()",[310,1799,1800],{},"toRelationships()",[310,1802,1803],{},"toLinks()",[310,1805,1806],{},"toResourceMeta()",") on the package's fake model and reads the descriptors they return.",[1784,1809,1810],{"label":14},[302,1811,1812,1790,1814,1817,1818,1821,1822,1824,1825,1828,1829,1832,1833,1775],{},[310,1813,30],{},[310,1815,1816],{},"^2.0",". The generator reads the definition the package compiles\n(",[310,1819,1820],{},"ArticleResource::definition()","): the type of each value, the related resources of each relationship (polymorphic\nones, Laravel's native JSON:API resources), their links and meta. ",[310,1823,652],{}," is a string and the documents carry the\n",[310,1826,1827],{},"jsonapi"," member (the ",[310,1830,1831],{},"JsonApi"," component), as the package renders them. A value without descriptor (a closure) is\ntyped by rendering the resource on a sample of its model. The error documents are those of ",[310,1834,1718],{},[1784,1836,1837,1875],{"label":9},[302,1838,1839,1790,1841,1844,1845,1849,1850,1226,1853,1226,1856,634,1859,1862,1863,1866,1867,1870,1871,1874],{},[310,1840,30],{},[310,1842,1843],{},"^3.0",", on ",[306,1846,1847],{"href":67},[310,1848,59],{},". The values of a\ndefinition are the shapes of the base: each field gives its type and its constraints (",[310,1851,1852],{},"min()",[310,1854,1855],{},"max()",[310,1857,1858],{},"format()",[310,1860,1861],{},"pattern()","), its description, its first example and ",[310,1864,1865],{},"deprecated",". An attribute rendered only when the sparse fieldset\nnames it (",[310,1868,1869],{},"whenInFields()",") says so; the links of a resource object are a URL or a link object by name. A value of\nunknown type (",[310,1872,1873],{},"mixed()",") and a custom type are typed by rendering the resource on a sample of its model.",[302,1876,1877,1878,1775],{},"Each revision of the API can be its own document: see ",[306,1879,254],{"href":255},[302,1881,1882],{},"The findings of the compilation of a definition (2.x and 3.x) are relayed as diagnostics of the document, once each.",[1884,1885,1886],"style",{},"html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .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 .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .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 .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--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 .sseR_, html code.shiki .sseR_{--shiki-light:#9C3EDA;--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 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 .syTEX, html code.shiki .syTEX{--shiki-light:#FF5370;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .stzsN, html code.shiki .stzsN{--shiki-light:#91B859;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":338,"searchDepth":364,"depth":364,"links":1888},[1889,1890,1891,1892],{"id":328,"depth":358,"text":329},{"id":1263,"depth":358,"text":1264},{"id":1711,"depth":358,"text":1712},{"id":1778,"depth":358,"text":1779},"Document the resources, the include and fields parameters and the errors of ark4ne\u002Flaravel-json-api.","md",{},"---\ntitle: JSON:API\ndescription: Document the resources, the include and fields parameters and the errors of ark4ne\u002Flaravel-json-api.\n---\n\nWith [Laravel JSON:API](\u002Flaravel-json-api) installed, its resources are documented as JSON:API resource objects in\n`application\u002Fvnd.api+json`, with their attributes, relationships, links, meta and `included` resources. Nothing to\nconfigure: the installed version is detected, and `php artisan about` shows it.\n\n:lib-card{slug=\"laravel-json-api\"}\n\n## What is documented\n\n::example{input=\"app\u002FHttp\u002FResources\u002FArticleResource.php\" output=\"components.schemas.Article\"}\n#input\n```php\n\u002F**\n * @extends JsonApiResource\u003CArticle>\n *\u002F\nfinal class ArticleResource extends JsonApiResource\n{\n    public function toAttributes(Request $request): iterable\n    {\n        return [\n            'title' => $this->string(),\n            'published_at' => $this->date(),\n        ];\n    }\n\n    protected function toRelationships(Request $request): iterable\n    {\n        return ['author' => $this->one(AuthorResource::class)];\n    }\n}\n```\n#output\n```json\n{\n  \"type\": \"object\",\n  \"required\": [\"id\", \"type\"],\n  \"properties\": {\n    \"id\": { \"type\": \"string\" },\n    \"type\": { \"type\": \"string\", \"const\": \"article\" },\n    \"attributes\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"title\": { \"type\": [\"string\", \"null\"] },\n        \"published_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n      }\n    },\n    \"relationships\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"author\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"data\": {\n              \"type\": [\"object\", \"null\"],\n              \"required\": [\"type\", \"id\"],\n              \"properties\": {\n                \"type\": { \"type\": \"string\", \"const\": \"author\" },\n                \"id\": { \"type\": \"string\" }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n::\n\n- The **descriptors** give the type of each value: `$this->string()`, `$this->date()`, `$this->struct()`…\n- The **relationships** give the resource identifiers, and the resources a response may include (`included`).\n- A resource returned by an action is wrapped in a document: `{\"data\": Article, \"included\": [Author]}`; a collection\n  gives `{\"data\": [Article]}`, with `links` and `meta` when paginated.\n\n## Include and sparse fieldsets\n\nThe `Includes` and `Fields` rules of a form request give the `include` and `fields[type]` query parameters, with the\nrelationships and the fields they accept:\n\n::example{input=\"app\u002FHttp\u002FRequests\u002FShowArticleRequest.php\" output=\"parameters\"}\n#input\n```php\npublic function rules(): array\n{\n    return [\n        'include' => [new Includes(ArticleResource::class)],\n        'fields' => [new Fields(ArticleResource::class)],\n    ];\n}\n```\n#output\n```json\n[\n  {\n    \"name\": \"include\",\n    \"in\": \"query\",\n    \"schema\": { \"type\": \"string\", \"example\": \"author\", \"description\": \"Relationships to include, separated by commas: `author`.\" }\n  },\n  {\n    \"name\": \"fields[article]\",\n    \"in\": \"query\",\n    \"schema\": { \"type\": \"string\", \"description\": \"Fields of `article`, separated by commas: `title`, `published_at`.\" }\n  },\n  {\n    \"name\": \"fields[author]\",\n    \"in\": \"query\",\n    \"schema\": { \"type\": \"string\", \"description\": \"Fields of `author`, separated by commas: `name`.\" }\n  }\n]\n```\n::\n\nThe rules are `Ark4ne\\JsonApi\\Requests\\Rules\\…` in 1.x, `Ark4ne\\JsonApi\\Http\\Rules\\…` from 2.x.\n\n## Errors\n\nIf the application renders its errors as JSON:API error documents (`JsonApi::renderErrors()` from 2.x), say so:\n\n```php [config\u002Fopenapi.php]\n'integrations' => [\n    'json_api' => ['errors' => true],\n],\n```\n\nThe 401, 403, 404, 422 and other error responses are then JSON:API error documents, in `application\u002Fvnd.api+json`.\n\n## Versions\n\n::tabs\n:::tabs-item{label=\"1.x\"}\n`ark4ne\u002Flaravel-json-api` `^1.9`. The generator runs the hooks of the resources (`toAttributes()`, `toRelationships()`,\n`toLinks()`, `toResourceMeta()`) on the package's fake model and reads the descriptors they return.\n:::\n:::tabs-item{label=\"2.x\"}\n`ark4ne\u002Flaravel-json-api` `^2.0`. The generator reads the definition the package compiles\n(`ArticleResource::definition()`): the type of each value, the related resources of each relationship (polymorphic\nones, Laravel's native JSON:API resources), their links and meta. `id` is a string and the documents carry the\n`jsonapi` member (the `JsonApi` component), as the package renders them. A value without descriptor (a closure) is\ntyped by rendering the resource on a sample of its model. The error documents are those of `JsonApi::renderErrors()`.\n:::\n:::tabs-item{label=\"3.x\"}\n`ark4ne\u002Flaravel-json-api` `^3.0`, on [`ark4ne\u002Flaravel-api-revisions`](\u002Flaravel-api-revisions). The values of a\ndefinition are the shapes of the base: each field gives its type and its constraints (`min()`, `max()`, `format()`,\n`pattern()`), its description, its first example and `deprecated`. An attribute rendered only when the sparse fieldset\nnames it (`whenInFields()`) says so; the links of a resource object are a URL or a link object by name. A value of\nunknown type (`mixed()`) and a custom type are typed by rendering the resource on a sample of its model.\n\nEach revision of the API can be its own document: see [API revisions](\u002Flaravel-openapi-generator\u002Fintegrations\u002Fapi-revisions).\n:::\n::\n\nThe findings of the compilation of a definition (2.x and 3.x) are relayed as diagnostics of the document, once each.\n",{"title":250,"description":1893},"6ppNlJvBKxwU5SC2wdNvaqeszyQwAx8aznwor-TlM-Y",[1900,1902],{"title":240,"path":241,"stem":242,"description":1901,"children":-1},"Change the whole document with a pass, and tell the generator what a middleware of your application means.",{"title":254,"path":255,"stem":256,"description":1903,"children":-1},"Generate one OpenAPI document per revision of a JSON:API application built on ark4ne\u002Flaravel-api-revisions.",1795438904430]