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

Specifying None as serializer/deserializer breaks kiota update #4916

Closed
ajtribick opened this issue Jul 1, 2024 · 2 comments · Fixed by #4923
Closed

Specifying None as serializer/deserializer breaks kiota update #4916

ajtribick opened this issue Jul 1, 2024 · 2 comments · Fixed by #4923
Assignees
Labels
Csharp Pull requests that update .net code type:bug A broken experience
Milestone

Comments

@ajtribick
Copy link
Contributor

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

After generating a C# client passing the options --deserializer=None --serializer=None a client is generated without any default serializers. If the OpenAPI spec is then updated, running kiota update fails with "sequence does not contain any elements"

Expected behavior

The client should be updated

How to reproduce

  • Create a C# client with no default serializer/deserializer factory
  • Modify the YAML spec
  • Run kiota update

Open API description file

No response

Kiota Version

1.15.0

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

No response

Known Workarounds

No response

Configuration

Found on Windows 10, x64

Debug output

No response

Other information

Based on a quick debug, it appears that the kiota update command is trying to set up a factory class called "None", rather than treating this as an indication that there should be no default factories.

@ajtribick ajtribick added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jul 1, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Jul 1, 2024
@msgraph-bot msgraph-bot bot added the Csharp Pull requests that update .net code label Jul 1, 2024
@ajtribick
Copy link
Contributor Author

further update - looks like it works if you use "none" rather than "None". Looks like a case (in)sensitivity mismatch between kiota generate and kiota update.

@andrueastman andrueastman removed the status:waiting-for-triage An issue that is yet to be reviewed or assigned label Jul 2, 2024
@andrueastman andrueastman moved this from Needs Triage 🔍 to Todo 📃 in Kiota Jul 2, 2024
@andrueastman andrueastman added this to the Kiota v1.17 milestone Jul 2, 2024
@andrueastman andrueastman self-assigned this Jul 2, 2024
@andrueastman
Copy link
Member

Thanks for raising this @ajtribick

Looks like the hashset with the configurations are not set with the same comparers when the lock file is read. Authored #4923 to resolve this one.

@andrueastman andrueastman modified the milestones: Kiota v1.17, Kiota v1.16 Jul 2, 2024
@github-project-automation github-project-automation bot moved this from Todo 📃 to Done ✔️ in Kiota Jul 2, 2024
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 type:bug A broken experience
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants