Skip to content

bug: Kotlin Codegen fails to generate Code when field name package is present #641

@JLLeitschuh

Description

@JLLeitschuh

Expected behavior

I was attempting to generate a client for the GitHub GraphQL API: https://docs.github.com/en/graphql/overview/public-schema

Unfortunately, it has a few fields name package and one type called Package thus causing an exception to get thrown when the code is generated

Actual behavior

Currently, the Gradle build fails with an error that package is an invalid name

Steps to reproduce

Note: A test case would be highly appreciated, but we understand that's not always possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions