Skip to content

Swagger: infer default response descriptions from HTTP status #28

Description

@chrishiguto

Problem

When the compiler infers a Standard Schema success response, it resolves the status but leaves the OpenAPI response description empty unless the consumer adds an explicit Swagger decorator. Consumers then repeat standard reason phrases such as OK and Created on every handler.

Expected behavior

When no description is explicitly supplied, inferred Swagger response metadata should derive the standard reason phrase from the resolved status.

Acceptance criteria

  • An inferred 200 response has description: "OK".
  • An inferred 201 response has description: "Created".
  • A statically resolved custom @HttpCode(...) uses the corresponding standard reason phrase.
  • An explicitly supplied description always wins.
  • Runtime serialization behavior is unchanged.
  • Compiler and runnable-example tests cover the behavior.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions