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

add support for non-wrapped collections responses #467

Closed
baywet opened this issue Aug 10, 2021 · 5 comments · Fixed by #480
Closed

add support for non-wrapped collections responses #467

baywet opened this issue Aug 10, 2021 · 5 comments · Fixed by #480
Assignees
Labels
Csharp Pull requests that update .net code fixed Java type:bug A broken experience TypeScript Pull requests that update Javascript code
Milestone

Comments

@baywet
Copy link
Member

baywet commented Aug 10, 2021

I've had a few more attempts in the last three weeks and still not working. I've had different errors over this period .. with today's being different again.

This is the latest error(s): (sorry the images are so wide)

image

image

Note that I've just pulled 1.0.4 for one of the packages.

dotnet.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <ItemGroup>
      <PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.0.3" />
      <PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.0.3" />
      <PackageReference Include="Microsoft.Kiota.Http.HttpClient" Version="1.0.4" />
  </ItemGroup>

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

</Project>

and the client was generated with latest code from main branch, which I just pulled down about 15 mins ago.

Thoughts? I'm wondering if this is my fault, now?

Originally posted by @PureKrome in #135 (comment)

Note: this is due to the fact that Microsoft Graph always wraps collections in response objects, but not all APIs do that. The Http Core interface needs a new method returning enumerable of parsable (and maybe one for primitives too?). And the generation logic needs to be updated to switch the method based on the collection kind.
AB#10607

@baywet baywet self-assigned this Aug 10, 2021
@baywet baywet added type:bug A broken experience Csharp Pull requests that update .net code Java TypeScript Pull requests that update Javascript code labels Aug 10, 2021
@baywet baywet added this to the Beta milestone Aug 10, 2021
@baywet baywet changed the title add support for collections responses add support for non-wrapped collections responses Aug 10, 2021
@baywet
Copy link
Member Author

baywet commented Aug 12, 2021

Hi @PureKrome
Thanks again for the super valuable feedback you are providing!
I put together PR #480 to fix this issue, which will close it when merged.
As always, you can resume your testing and work on #135 by using the branch of the pull request instead of main. Happy coding.

@baywet
Copy link
Member Author

baywet commented Aug 12, 2021

Note: the packages won't align with the generation result until published, you might want to use local references if testing from the PR.

@baywet baywet added the fixed label Aug 12, 2021
@PureKrome
Copy link
Contributor

Thanks heaps @baywet !!

Note: the packages won't align with the generation result until published

When are packages "released"?

@baywet
Copy link
Member Author

baywet commented Aug 13, 2021

you're welcome! just about now. :)

@PureKrome
Copy link
Contributor

ha woot!

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 fixed Java type:bug A broken experience TypeScript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants