{"templateId":"markdown","versions":[{"version":"v1","label":"1.x (archive)","link":"/docs/cli/v1/configuration/reference/client","default":false,"active":false,"folderId":"6f4800fc"},{"version":"v2","label":"2.x (current)","link":"/docs/cli/configuration/reference/client","default":true,"active":true,"folderId":"6f4800fc"}],"sharedDataIds":{"sidebar":"sidebar-docs-cli.sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Redocly CLI","type":"markdown"},"seo":{"title":"client","description":"OpenAPI-generated documentation tool with 24k+ stars on Github - make APIs your company's superpower.","siteUrl":"https://redocly.com","image":"/assets/redocly-card.f670aae34a39545a5ea633a540cb3a4a333a1f23bb2ed3c4a1b17a5fbcf0ac85.db81178d.png","lang":"en-US"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"client","__idx":0},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"introduction","__idx":1},"children":["Introduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]}," configuration provides settings for the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/commands/generate-client"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["generate-client"]}]}," command."," ","The block can be used at the root of the configuration file, where it holds defaults, and inside an ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/configuration/reference/apis"},"children":["API-specific section"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apis.<name>.client"]},"), where it overrides the root block for the specific API."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The input and output are not part of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]}," block:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["input"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apis.<name>.root"]},", or a path or alias passed on the command line."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["output"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apis.<name>.clientOutput"]},"; when omitted it defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<name>.client.ts"]}," next to the configuration file."," ","The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output"]}," flag overrides it for single-API invocations."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"options","__idx":2},"children":["Options"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each scalar option mirrors the matching CLI flag and shares its default — see the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/commands/generate-client#options"},"children":["command options"]}," for the full description of each value."," ","The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pagination"]}," option is config-only — a structured, durable contract that belongs in versioned configuration rather than a shell string."," ","For runs without a configuration file, declare pagination per operation with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-redocly-pagination"]}," extension in the description, or pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pagination"]}," to the programmatic ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["generateClient(...)"]},"."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["generators"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[string]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Generators to run, in order. Each entry is a built-in name (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sdk"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["zod"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tanstack-query"]}," — or its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-vue"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-svelte"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-solid"]}," variants — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["swr"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transformers"]},") or a custom generator's path or package name."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["outputMode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["File layout: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["single"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["split"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["runtime"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Runtime distribution: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inline"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["package"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["importExt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Extension in generated relative imports: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["js"]}," (default, for tsc and bundlers) or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ts"]}," (for Node's built-in type stripping)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["argsStyle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How operation inputs are passed: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flat"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["grouped"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorMode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How operations report HTTP errors: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["throw"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dateType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date-time"]}," fields: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Date"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mockData"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Data mode for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mock"]}," generator: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["static"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["faker"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mockSeed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Seed for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["faker"]},"-mode mocks."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["queryKeyPrefix"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Leading element for every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tanstack-query"]}," query/mutation key — namespaces the cache when several generated APIs share one QueryClient. Config-only, no flag."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serverUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Server URL included in the client as its default; falls back to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["servers[0].url"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setup"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Path to a publisher setup module that gets included in the client — pre-configures defaults such as the server URL, retries, headers, and middleware. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/guides/customize-client-generation#publisher-defaults"},"children":["Publisher defaults"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pagination"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#pagination-object"},"children":["Pagination object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Declares how the API paginates, so paginated operations gain typed ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".pages()"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".items()"]}," async iterators."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pagination-object","__idx":3},"children":["Pagination object"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pagination"]}," block is an optional convention rule (the rule fields below, applied to every operation it structurally fits when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["style"]}," is set), plus per-operation ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operations"]}," overrides and an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exclude"]}," list."," ","See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/guides/use-generated-client#pagination"},"children":["Pagination in the usage guide"]}," for how the generated iterators behave."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["style"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How the iterator advances: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]}," (follow a response cursor), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}," (advance an offset by each page's item count), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page"]}," (increment a page number), or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["link"]}," (follow the response's RFC 8288 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Link"]}," header ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rel=\"next\""]}," — no advance parameter; a convention rule fits only operations whose response documents a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Link"]}," header)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursorParam"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The query parameter that receives the cursor. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["REQUIRED"]}," for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]}," style."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nextCursor"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JSON pointer (RFC 6901, starts with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/"]},") to the next cursor in the response. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["REQUIRED"]}," for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]}," style."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hasMore"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]}," style): JSON pointer to a boolean \"more pages\" flag — iteration stops when it resolves to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},", for APIs whose cursor stays non-null on the last page."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offsetParam"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The query parameter the iterator advances. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["REQUIRED"]}," for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page"]}," styles."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limitParam"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional page-size query parameter for any style; recorded for tooling — the iterator never sets it."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["items"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["REQUIRED"]},". JSON pointer to the page's item array in the response; use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["''"]}," when the response body is the item array itself."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exclude"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[string]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["operationIds that no source may paginate; wins over overrides, extensions, and the convention."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operations"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["map of operationId → rule"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Per-operation rules taking the same fields as the convention; each entry beats the description's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-redocly-pagination"]}," and the convention."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The rules are verified at generate time: the advance parameter must be a declared query parameter of the right type (string for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]},", numeric for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page"]},"), and the JSON pointers must resolve in the operation's JSON success-response schema, with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["items"]}," landing on an array and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hasMore"]}," on a boolean."," ","A convention that doesn't fit an operation skips it; an explicit rule that doesn't fit fails generation."," ","The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-redocly-pagination"]}," operation extension in the API description takes the same rule fields."," ","Per operation, precedence is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operations[id]"]},", then ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-redocly-pagination"]},", then the convention."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":4},"children":["Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configure-defaults-with-a-per-api-override","__idx":5},"children":["Configure defaults with a per-API override"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An API with its own ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]}," block uses that block in place of the top-level one; the top-level block applies to APIs without one."," ","A file-path invocation matching no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apis:"]}," entry uses the top-level ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]},", and CLI flags take precedence over the resolved configuration."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"client:\n  generators:\n    - sdk\n  argsStyle: flat\napis:\n  cafe:\n    root: ./openapi.yaml\n    clientOutput: ./src/api/client.ts\n    client: # replaces the top-level block for this API\n      generators:\n        - sdk\n        - zod\n      argsStyle: grouped\n  orders:\n    root: ./orders.yaml # no client block — uses the top-level one\n    clientOutput: ./src/api/orders.client.ts\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"declare-pagination","__idx":6},"children":["Declare pagination"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Declare the convention once, with per-operation overrides and exclusions:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"client:\n  pagination:\n    style: cursor\n    cursorParam: cursor\n    nextCursor: /nextCursor\n    items: /orders\n    exclude:\n      - listOrderEvents\n    operations:\n      listMenuItems:\n        style: page\n        offsetParam: page\n        items: /data\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For code-level control — including registering ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/guides/customize-client-generation#custom-generators"},"children":["custom generators"]}," inline — use the programmatic ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["generateClient(...)"]}," API instead."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-options","__idx":7},"children":["Related options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/configuration/reference/apis"},"children":["apis"]}," settings define each API's root document, output, and per-API overrides."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resources","__idx":8},"children":["Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/commands/generate-client"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["generate-client"]}," command"]}," — flags, output modes, and invocation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/guides/use-generated-client"},"children":["Use the generated client"]}," — the runtime API (auth, retries, middleware, extra generators)."]}]}]},"headings":[{"value":"client","id":"client","depth":1},{"value":"Introduction","id":"introduction","depth":2},{"value":"Options","id":"options","depth":2},{"value":"Pagination object","id":"pagination-object","depth":3},{"value":"Examples","id":"examples","depth":2},{"value":"Configure defaults with a per-API override","id":"configure-defaults-with-a-per-api-override","depth":3},{"value":"Declare pagination","id":"declare-pagination","depth":3},{"value":"Related options","id":"related-options","depth":2},{"value":"Resources","id":"resources","depth":2}],"frontmatter":{"seo":{"title":"client"}},"lastModified":"2026-07-30T09:50:35.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/cli/configuration/reference/client","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}