Skip to content

Add support for --name-mappings #71

@MoonWalkerAZ

Description

@MoonWalkerAZ

We have a 3rd party spec that contains similar names in schema. Can name mappings be added to the library? Or is there already a way to use name mappings?

Schema sample:

"properties": {
"feature_enabled": {
"type": "boolean",
"description": "Whether the feature is enabled or not.",
"example": true
},
"featureEnabled": {
"deprecated": true,
"type": "boolean",
"description": "Use `feature_enabled` instead.",
"example": true
}
...
}

Result:

 public static final String JSON_PROPERTY_FEATURE_ENABLED = "feature_enabled";
  @javax.annotation.Nullable
  private Boolean featureEnabled;

  public static final String JSON_PROPERTY_FEATURE_ENABLED = "featureEnabled";
  @javax.annotation.Nullable
  private Boolean featureEnabled;

The issue is that the same constant name is generated.

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