Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][Kotlin] Enum type name starts lowecased and causes a build-error #18836

Open
3 of 6 tasks
hrach opened this issue Jun 2, 2024 · 1 comment
Open
3 of 6 tasks

Comments

@hrach
Copy link

hrach commented Jun 2, 2024

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

After updating to 7.6.0 (from 7.4.0) there is a regression. The produced code does not compile:

data class FavoritesEndpointItemsDto constructor (
    @Json(name = "user_gender")
    val userGender: FavoritesEndpointItemsDto.UserGender? = null,
) {
    /**
     * 
     *
     * Values: MALE,FEMALE
     */
    enum class userGender(val value: kotlin.String) {
        @Json(name = "male") MALE("male"),
        @Json(name = "female") FEMALE("female");
    }
}
openapi-generator version

7.6.0, yes, a regression

OpenAPI declaration file content or url
            "FavoritesEndpoint_Items": {
                "type": "object",
                "properties": {
                    "user_gender": {
                        "type": "string",
                        "enum": [
                            "male",
                            "female"
                        ]
                    }
                },
                "required": [
                ]
            },
Related issues/PRs
@hrach
Copy link
Author

hrach commented Jun 3, 2024

Tested 7.5.0, it is broken as well, so it is in its changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant