Kotlin interface extends interface missing override modifier (Version: [graphql-java-codegen 4.1.2])
See original GitHub issueIssue Description
When generate Kotlin classes, interface that extends interface doesn’t not have proper override
modifier.
Steps to Reproduce
Similar to https://github.com/kobylynskyi/graphql-java-codegen/commit/4917c4bddcdc9cda78c04ab9491f220e33086c8f
Expected Result
interface BarBar : Bar{
override val id: String
}
Actual Result
interface BarBar : Bar{
val id: String
}
BarBar
hides member of supertype ‘Bar’ and needs ‘override’ modifier.
Your Environment and Setup
- graphql-java-codegen: E.g.: 4.1.2
- Build tool: E.g.: Gradle
- Java tool: E.g.: Oracle JDK 15
- Mapping Config: E.g.:
graphqlCodegen {
// all config options:
// https://github.com/kobylynskyi/graphql-java-codegen/blob/master/docs/codegen-options.md
outputDir = new File("$projectDir/src/main/graphql")
modelNameSuffix = "GraphqlModel"
apiRootInterfaceStrategy = ApiRootInterfaceStrategy.SINGLE_INTERFACE
apiNamePrefixStrategy = ApiNamePrefixStrategy.FILE_NAME_AS_PREFIX
generatedLanguage = GeneratedLanguage.KOTLIN
}
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Kotlin class implementing Java interface error - Stack Overflow
When you implement an interface within Kotlin, you have to make sure to override the interface methods inside of the class ...
Read more >Chapter 4. Classes, objects, and interfaces - Kotlin in Action
The class 'Button' must override public open fun showOff() because it inherits many implementations of it. The Kotlin compiler forces you to provide...
Read more >KotlinGenerator not generating override modifier for properties ...
I'm trying to use the new org.jooq.codegen.KotlinGenerator to generate kotlin code. I have the generator configured in order to have records and pojo ......
Read more >Interfaces · Kotlin Quick Reference
This page discusses Kotlin interfaces, including how to write interfaces, and how to extend multiple interfaces in a Kotlin class.
Read more >Kotlin From Scratch: Abstract Classes, Interfaces, Inheritance ...
Here we created a class StudentLocalDataSource that implements the StudentRepository interface. We use the override modifier to label the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ntf I’ve submitted a PR to fix it,please take a look.
Will be released in 4.1.3