Skip to content

Generate @Deprecated annotation for deprecated operations and schemas #39

@halotukozak

Description

@halotukozak

Description

OpenAPI 3.0 allows marking operations, parameters, and schemas with deprecated: true. Currently this flag is ignored — generated code has no indication that something is deprecated. The generator should add Kotlin's @Deprecated annotation to affected classes and functions.

Acceptance criteria

  • SpecParser extracts the deprecated flag from operations and schemas
  • ClientGenerator adds @Deprecated annotation to generated suspend functions for deprecated operations
  • ModelGenerator adds @Deprecated annotation to generated data classes for deprecated schemas
  • Deprecated parameters get @Deprecated on the corresponding function parameter
  • Tests cover parsing and generation of deprecated operations, schemas, and parameters

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions