Skip to content

The schema reference is not resolved #7353

@TroyHickling

Description

@TroyHickling

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Nuget tool

Client library/SDK language

Csharp

Describe the bug

When trying to generate a client from the ideal-postcodes.co.uk OpenAPI json/yaml, an error is generated

warn: Kiota.Builder.KiotaBuilder[0]
      Discriminator Context is not inherited from Context.
warn: Kiota.Builder.KiotaBuilder[0]
      Discriminator NoContext is not inherited from NoContext.
warn: Kiota.Builder.KiotaBuilder[0]
      Discriminator HereAddress is not inherited from HereAddress.
crit: Kiota.Builder.KiotaBuilder[0]
      error generating the client: One or more errors occurred. (One or more errors occurred. (The schema reference is not resolved))

Seems to occur on all languages. Assume this is either an issue with the ideal-postcodes.co.uk OpenAPI.json, or how Kiota is processing it before getting to the language generation.

Have tried on both 1.29.0 and 1.30.0

If this is a problem with the ideal-postcode.co.uk OpenAPI.json, then happy to feedback any information that will help identify the problem and what they need to fix.

Or if there's a quick fix for generating a client, by manually fixing the .json that would be appreciated

Expected behavior

The client to generate successfully. Or a clearer message as to exactly where the error is. If the error is in the OpenAPI.json it would be handy to know what's causing it to feedback to ideal-postcodes.co.uk

How to reproduce

kiota generate --openapi https://openapi.ideal-postcodes.co.uk/openapi.json --language csharp

Open API description file

https://openapi.ideal-postcodes.co.uk/openapi.json

Kiota Version

1.30.0 / 1.29.0

Latest Kiota version known to work for scenario above?(Not required)

Unknown

Known Workarounds

None

Configuration

  • OS: Windows 11 25h2
  • Architecture: x64
  • Likely not configuration specific

Debug output

Click to expand log ```

kiota generate --openapi https://openapi.ideal-postcodes.co.uk/openapi.json --language csharp --ll debug
dbug: Kiota.Builder.KiotaBuilder[0]
kiota version 1.29.0
dbug: Kiota.Builder.KiotaBuilder[0]
cache file C:\Users\user\AppData\Local\Temp\kiota\cache\generation\9128E115974229C79C75297D8FB952F09D3B80233108EDE68D239C25E7DA589D\openapi.json not found, downloading from https://openapi.ideal-postcodes.co.uk/openapi.json
info: Kiota.Builder.KiotaBuilder[0]
loaded description from remote source
dbug: Kiota.Builder.KiotaBuilder[0]
step 1 - reading the stream - took 00:00:00.7197447
dbug: Kiota.Builder.KiotaBuilder[0]
step 2 - parsing the document - took 00:00:00.1237987
dbug: Kiota.Builder.KiotaBuilder[0]
step 3 - updating generation configuration from kiota extension - took 00:00:00.0000628
dbug: Kiota.Builder.KiotaBuilder[0]
step 4 - filtering API paths with patterns - took 00:00:00.0024463
info: Kiota.Builder.KiotaBuilder[0]
Client root URL set to https://api.ideal-postcodes.co.uk/v1
dbug: Kiota.Builder.KiotaBuilder[0]
step 5 - checking whether the output should be updated - took 00:00:00.0180995
dbug: Kiota.Builder.KiotaBuilder[0]
step 6 - create uri space - took 00:00:00.0020218
dbug: Kiota.Builder.KiotaBuilder[0]
InitializeInheritanceIndex 00:00:00.0019734
warn: Kiota.Builder.KiotaBuilder[0]
Discriminator Context is not inherited from Context.
warn: Kiota.Builder.KiotaBuilder[0]
Discriminator NoContext is not inherited from NoContext.
warn: Kiota.Builder.KiotaBuilder[0]
Discriminator HereAddress is not inherited from HereAddress.
crit: Kiota.Builder.KiotaBuilder[0]
error generating the client: One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (The schema reference is not resolved))))

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    CsharpPull requests that update .net codestatus:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    Status

    Needs Triage 🔍

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions