Skip to content

[Java] invalid "import" statement for GITHUB.COM api #7829

Description

@WolfgangHG

Found as part of #7774:

Using the source code from 2026-06-17 and this command:

.\it\generate-code.ps1 -descriptionUrl https://raw.githubusercontent.com/github/rest-api-description/refs/heads/main/descriptions/api.github.com/api.github.com.json -language java -dev
.\it\exec-cmd.ps1 -descriptionUrl https://raw.githubusercontent.com/github/rest-api-description/refs/heads/main/descriptions/api.github.com/api.github.com.json -language java

The generated client does not compile:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.15.0:compile (default-compile) on project kiota-gh-api: Compilation failure
[ERROR] /c:/path/to/kiota/it/java/gh/src/main/java/apisdk/repos/item/item/contents/item/WithPathItemRequestBuilder.java:[10,21] cannot find symbol
[ERROR]   symbol:   class WithPath
[ERROR]   location: package apisdk.models

The offending line is

import apisdk.models.WithPath;

After having removed it in the generated client, it seems to compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Needs Triage 🔍

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions