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

Indexer breaking changes improvements #3070

Open
baywet opened this issue Aug 4, 2023 · 3 comments
Open

Indexer breaking changes improvements #3070

baywet opened this issue Aug 4, 2023 · 3 comments
Labels
enhancement New feature or request generator Issues or improvements relater to generation capabilities.
Milestone

Comments

@baywet
Copy link
Member

baywet commented Aug 4, 2023

Follow up to #2594: we should drop the backward compatible string variant of the indexer we introduced
Follow up to #2978: we should avoid using a hardcoded parameter name and use the one from the description

@baywet baywet added enhancement New feature or request generator Issues or improvements relater to generation capabilities. labels Aug 4, 2023
@baywet baywet added this to the Kiota v2.0 milestone Aug 4, 2023
@baywet baywet self-assigned this Aug 4, 2023
@baywet baywet added this to Kiota Aug 4, 2023
@github-project-automation github-project-automation bot moved this to Todo in Kiota Aug 4, 2023
@IEvangelist
Copy link
Member

Hi @baywet, I was going to ask about the availability of the improvements specific to C# that would include naming the parameters of builder indexes, such that they align with the URL template. For example, generated clients seem to use a hardcoded position name, which isn't meaningful at all. It would be so much better if the name matched the name in the template, for example:

Considering the following GitHub REST API.

It should generate a client that is compatible with the following named indexer parameters:

// URL template: /repos/{owner}/{repo}/issues/{issue_number}/labels
//    /repos
//       | /{owner}
//       |     |            /{repo}
//       |     |               |              /issues
//       |     |               |                 |  /{issue_number}
//       |     |               |                 |         |          /labels
//       ⭳     ⭳               ⭳                 ⭳         ⭳             ⭳
client.Repos[owner: "dotnet"][repo: "runtime"].Issues[issue_number: 1].Labels.*Async

I would love to see this available ASAP, and I think it would be perfectly acceptable for it to be behind the --exclude-backward-compatible.

@baywet
Copy link
Member Author

baywet commented Feb 2, 2024

Thanks for the additional context here.
I'll let @sebastienlevert comment on whether we should introduce additional behaviour behind ECB to emit the correct parameter name before the v2.

@sebastienlevert
Copy link
Contributor

v2 is still something that we haven't committed to as we've been able to introduce changes without making them breaking. I'd add slide them behind ECB for now and remove when v2 is out the door.

@baywet baywet removed their assignment Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request generator Issues or improvements relater to generation capabilities.
Projects
Status: New📃
Development

No branches or pull requests

3 participants