Skip to content

Disabling common prefix redaction for enums #872

@MatteoJoliveau

Description

@MatteoJoliveau

Hi! We're exploring the usage of typify to generate some Rust code that needs to process incoming JSON objects.

One of these schemas is an enum, which can be summarised as:

enum Product {
   MotorOffer(MotorOffer),
   MotorInsurance(MotorInsurance),
}

Unfortunately, the code generator in typify is eliminating the Motor prefix, which we would like to preserve because we have other kinds of products in different parts of the codebase (not represented by this enum) and losing this prefix makes the code less clear and readable for us.

Is there a way to turn off this common prefix elimination?

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