Skip to content

[Feature Request] Add support for @Encodable / @Decodable macros for partial conformance #134

@woohyunjin06

Description

@woohyunjin06

Is your feature request related to a problem? Please describe.
In our codebase, we frequently separate request and response models, meaning we often need types that are only Encodable or only Decodable.
However, when using @Codable, both conformance implementations are generated, even when unnecessary. This can lead to unwanted behavior and redundant code.

Describe the solution you'd like
I’d love to see support for @Encodable and @Decodable as standalone macros alongside @Codable.
This would allow developers to precisely specify what kind of Codable behavior they need, and better reflect intended use.

Describe alternatives you've considered
One potential workaround is applying @IgnoreEncoding (or @IgnoreDecoding) to every property.
While this may prevent macro-generated errors, it still results in the type conforming to Encodable (or Decodable) unnecessarily—especially in cases like response models, where encoding should never happen.
So while technically feasible, this feels like a workaround rather than a proper solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions