Skip to content

Response envelopes: noun names for five verb-named payload properties #808

Open

Description

@Blind-Striker

Five response envelopes name their payload property after the operation's verb rather than after what the payload is:

Response Payload property Payload type
SessionGenerateResponse Generate SessionGenerateData
SessionPromptResponse Prompt SessionInboxUser
ExperimentalGenerateTextResponse GenerateText ExperimentalGenerateTextData
ExperimentalGenerateImageResponse GenerateImage GenerateImageResult
ExperimentalGenerateDecisionsResponse GenerateDecisions GenerateDecisionResult

Every other envelope names its payload as a noun (created.Session, for example), so result.Generate.Text reads oddly next to them. The generator derives the property name from the operation when no naming row overrides it, and these five operations have no such row.

1.0.0 shipped these names, and package validation runs against that baseline, so removing them is a breaking change. In 1.1:

  • add a noun-named property to each envelope; the names are the maintainer's call;
  • mark the current property [Obsolete] and point it at the new one;
  • remove the old names in the next major version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions