question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kotlin interface extends interface missing override modifier (Version: [graphql-java-codegen 4.1.2])

See original GitHub issue

Issue 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jxnu-liguobincommented, Jan 30, 2021

@ntf I’ve submitted a PR to fix it,please take a look.

0reactions
kobylynskyicommented, Jan 30, 2021

Will be released in 4.1.3

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found