-
Notifications
You must be signed in to change notification settings - Fork 214
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
Kiota produces different model with same command and OpenAPI description #4139
Comments
EDIT: After further analysis I've noticed that the issue is actually related to the Here is an example with a faulty model even though the |
Hi @bmarkovic17 "TeamAndCompetitor": {
"allOf": [
{
"$ref": "#/components/schemas/Competitor"
},
{
"$ref": "#/components/schemas/Team"
}
]
}, Long story short, kiota implements the following rules for the schema elements:
The main logic behind all of this is here kiota/src/Kiota.Builder/KiotaBuilder.cs Line 1806 in d15ad50
And you can duplicate and tweak this unit test
With that context in mind, is this something you'd be willing to work on a pull request for? |
Thanks for the clarification @baywet. |
@bmarkovic17 can you test this again with the latest preview from yesterday and confirm whether you observe the problem? We've made significant improvements to the handling of allof edge scenarios with #4668 and #4381 |
@baywet Sorry for my late reply, we were busy with some other stuff that had a narrow deadline. Thanks. |
I also ran into the issue with Kiota not being idempotent and after going through the already existing issues (mainly #2442) I decided to create a new one as it might provide more insight. The problem basically boils down to these few classes shown on image below where most of them don't get generated, while the one that depends on them gets generated differently.
Setting the environment variable
KIOTA_GENERATION_MAXDEGREEOFPARALLELISM
to1
didn't help, but I've noticed something that might be helpful:generate
command will almost everytime produce a wrong modelupdate
command will almost everytime produce a correct modelTeamAndCompetitor
class in the same way that thegenerate
command produces it, even though the othere classes were not missingHere is the the OpenApi description that I'm using with Kiota 1.11.1 and here are the commands that I've used to generate the client:
kiota generate --openapi openapi.json --language csharp --clean-output --clear-cache --exclude-backward-compatible
kiota update
Let me know if you need more information or I can help in any way.
Thanks.
The text was updated successfully, but these errors were encountered: