Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping values are not allowed in this context #6024

Open
dbheale opened this issue Jan 15, 2025 · 0 comments
Open

Mapping values are not allowed in this context #6024

dbheale opened this issue Jan 15, 2025 · 0 comments
Labels
Csharp Pull requests that update .net code status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience

Comments

@dbheale
Copy link

dbheale commented Jan 15, 2025

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Windows executable

Client library/SDK language

Csharp

Describe the bug

I am getting the following error:
Error: KiotaBuilder OpenAPI error: #line=35 - (Lin: 35, Col: 26395, Chr: 27722) - (Lin: 35, Col: 26395, Chr: 27722): Mapping values are not allowed in this context.
My command:
kiota generate -d "https://localhost:44321/openapi/v1.json" -l csharp -n "FtSeriateConfiguration.Client.Kiota.ConfigurationService" --ebc -c ConfigurationApiClient --co -o "./Kiota
And I have a brand new API with only one endpoint. Here's my API doc:

{
  "openapi": "3.0.1",
  "info": {
    "title": "FtSeriateConfiguration.Server | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://localhost:44321"
    },
    {
      "url": "http://localhost:5249"
    }
  ],
  "paths": {
    "/api/user": {
      "get": {
        "tags": [
          "V1"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": { },
  "tags": [
    {
      "name": "V1"
    }
  ]
}

Expected behavior

I would expect a ConfigurationApiClient.cs file to be created within the FtSeriateConfiguration.Client.Kiota.ConfigurationService namespace under the relative Kiota folder.

How to reproduce

Use the provided JSON and run it through Kiota.

v1.json

Open API description file

No response

Kiota Version

1.22.3+a544276a5ee9d4a7b67cc0fbd5ce2804c172fa14

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

No response

Known Workarounds

No response

Configuration

  • OS: Windows
  • Architecture: x64

Debug output

Click to expand log ```
</details>


### Other information

_No response_
@dbheale dbheale added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jan 15, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Jan 15, 2025
@msgraph-bot msgraph-bot bot added the Csharp Pull requests that update .net code label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Csharp Pull requests that update .net code status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience
Projects
Status: Needs Triage 🔍
Development

No branches or pull requests

1 participant