Gitlab's Schema(https://gitlab.com/api/graphql) contains some enums with two instances of the same value, one in snake_case and deprecated the other in SCREAMING_SNAKE_CASE. For example, this section of the Schema(gitlab_schema.json):
{
"kind": "ENUM",
"name": "ContainerRepositorySort",
"description": "Values for sorting container repositories",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": [
{
"name": "NAME_ASC",
"description": "Name by ascending order.",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "NAME_DESC",
"description": "Name by descending order.",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "updated_desc",
"description": "Updated at descending order. Deprecated in 13.5: This was renamed.",
"isDeprecated": true,
"deprecationReason": "This was renamed. Please use `UPDATED_DESC`. Deprecated in 13.5."
},
{
"name": "updated_asc",
"description": "Updated at ascending order. Deprecated in 13.5: This was renamed.",
"isDeprecated": true,
"deprecationReason": "This was renamed. Please use `UPDATED_ASC`. Deprecated in 13.5."
},
{
"name": "created_desc",
"description": "Created at descending order. Deprecated in 13.5: This was renamed.",
"isDeprecated": true,
"deprecationReason": "This was renamed. Please use `CREATED_DESC`. Deprecated in 13.5."
},
{
"name": "created_asc",
"description": "Created at ascending order. Deprecated in 13.5: This was renamed.",
"isDeprecated": true,
"deprecationReason": "This was renamed. Please use `CREATED_ASC`. Deprecated in 13.5."
},
{
"name": "UPDATED_DESC",
"description": "Updated at descending order.",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "UPDATED_ASC",
"description": "Updated at ascending order.",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "CREATED_DESC",
"description": "Created at descending order.",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "CREATED_ASC",
"description": "Created at ascending order.",
"isDeprecated": false,
"deprecationReason": null
}
],
"possibleTypes": null
},
0>GraphQlClient.cs(5037,46): Error CS0102 : The type 'ContainerRepositorySort' already contains a definition for 'UpdatedDesc'
0>GraphQlClient.cs(5041,45): Error CS0102 : The type 'ContainerRepositorySort' already contains a definition for 'UpdatedAsc'
0>GraphQlClient.cs(5045,46): Error CS0102 : The type 'ContainerRepositorySort' already contains a definition for 'CreatedDesc'
0>GraphQlClient.cs(5049,45): Error CS0102 : The type 'ContainerRepositorySort' already contains a definition for 'CreatedAsc'
Gitlab's Schema(https://gitlab.com/api/graphql) contains some enums with two instances of the same value, one in
snake_case
and deprecated the other inSCREAMING_SNAKE_CASE
. For example, this section of the Schema(gitlab_schema.json):This results in the uncompilable generated code: