Skip to content

Typed page classes that rebuild typed params, not URL strings #56

Description

@OmarAlJarrah

Problem (spike)

Cursor-based next-page navigation should rebuild a typed params object, not splice a URL.

Proposed change

Generate page types whose nextPage() calls the operation again with params.toBuilder().<cursor>(…).build() — cursor carried in a typed param, no URL surgery. Requires the operation-params SPI. Keep the existing strategy-based RequestRebuilder as the bring-your-own path.

Prior art: openai-java's generated *Page types.

Acceptance

  • Typed-param next-page generation
  • No URL string surgery in generated paging

Depends on the operation-params SPI.

Dependencies


Priority: high · Effort: large

Metadata

Metadata

Assignees

No one assigned

    Labels

    codegenfuture KotlinPoet codegenenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions