Skip to content

Generate a lazy sub-service accessor tree #59

Description

@OmarAlJarrah

Problem

A deep service tree shouldn't instantiate everything eagerly or duplicate raw/cooked impls.

Proposed change

Generate by lazy sub-service accessors; the root reuses the nested raw-response impl to halve the generated type count. Note by lazy vs a memoized supplier for any future Java target.

Prior art: openai-java's client impl (OpenAIClientImpl.kt).

Acceptance

  • Lazy sub-service accessors
  • Raw impl reused

Dependencies


Priority: medium · Effort: small

Metadata

Metadata

Assignees

No one assigned

    Labels

    codegenfuture KotlinPoet codegenenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions